Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
193e7f8b
Commit
193e7f8b
authored
Oct 31, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Centralize unit test declaration location
Also turn on MavlinkLogTest
parent
c68faf27
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
72 additions
and
37 deletions
+72
-37
QGCApplication.pro
QGCApplication.pro
+1
-0
FactSystemTestGeneric.cc
src/FactSystem/FactSystemTestGeneric.cc
+0
-2
FactSystemTestPX4.cc
src/FactSystem/FactSystemTestPX4.cc
+0
-2
MissionItemTest.cc
src/MissionItemTest.cc
+0
-2
MissionControllerTest.cc
src/MissionManager/MissionControllerTest.cc
+0
-2
MissionManagerTest.cc
src/MissionManager/MissionManagerTest.cc
+0
-3
SetupViewTest.cc
src/VehicleSetup/SetupViewTest.cc
+0
-2
FileDialogTest.cc
src/qgcunittest/FileDialogTest.cc
+0
-2
FileManagerTest.cc
src/qgcunittest/FileManagerTest.cc
+0
-2
FlightGearTest.cc
src/qgcunittest/FlightGearTest.cc
+0
-2
GeoTest.cc
src/qgcunittest/GeoTest.cc
+0
-2
LinkManagerTest.cc
src/qgcunittest/LinkManagerTest.cc
+0
-2
MainWindowTest.cc
src/qgcunittest/MainWindowTest.cc
+0
-3
MavlinkLogTest.cc
src/qgcunittest/MavlinkLogTest.cc
+0
-3
MessageBoxTest.cc
src/qgcunittest/MessageBoxTest.cc
+0
-2
PX4RCCalibrationTest.cc
src/qgcunittest/PX4RCCalibrationTest.cc
+0
-1
TCPLinkTest.cc
src/qgcunittest/TCPLinkTest.cc
+0
-4
UnitTest.h
src/qgcunittest/UnitTest.h
+1
-1
UnitTestList.cc
src/qgcunittest/UnitTestList.cc
+70
-0
No files found.
QGCApplication.pro
View file @
193e7f8b
...
@@ -488,6 +488,7 @@ SOURCES += \
...
@@ -488,6 +488,7 @@ SOURCES += \
src
/
qgcunittest
/
TCPLinkTest
.
cc
\
src
/
qgcunittest
/
TCPLinkTest
.
cc
\
src
/
qgcunittest
/
TCPLoopBackServer
.
cc
\
src
/
qgcunittest
/
TCPLoopBackServer
.
cc
\
src
/
qgcunittest
/
UnitTest
.
cc
\
src
/
qgcunittest
/
UnitTest
.
cc
\
src
/
qgcunittest
/
UnitTestList
.
cc
\
src
/
VehicleSetup
/
SetupViewTest
.
cc
\
src
/
VehicleSetup
/
SetupViewTest
.
cc
\
}
#
DebugBuild
|
WindowsDebugAndRelease
}
#
DebugBuild
|
WindowsDebugAndRelease
}
#
MobileBuild
}
#
MobileBuild
...
...
src/FactSystem/FactSystemTestGeneric.cc
View file @
193e7f8b
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
#include "FactSystemTestGeneric.h"
#include "FactSystemTestGeneric.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
UT_REGISTER_TEST
(
FactSystemTestGeneric
)
/// FactSystem Unit Test for PX4 autpilot
/// FactSystem Unit Test for PX4 autpilot
FactSystemTestGeneric
::
FactSystemTestGeneric
(
void
)
FactSystemTestGeneric
::
FactSystemTestGeneric
(
void
)
{
{
...
...
src/FactSystem/FactSystemTestPX4.cc
View file @
193e7f8b
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
#include "FactSystemTestPX4.h"
#include "FactSystemTestPX4.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
UT_REGISTER_TEST
(
FactSystemTestPX4
)
/// FactSystem Unit Test for PX4 autpilot
/// FactSystem Unit Test for PX4 autpilot
FactSystemTestPX4
::
FactSystemTestPX4
(
void
)
FactSystemTestPX4
::
FactSystemTestPX4
(
void
)
{
{
...
...
src/MissionItemTest.cc
View file @
193e7f8b
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include "MissionItemTest.h"
#include "MissionItemTest.h"
#include "MissionItem.h"
#include "MissionItem.h"
UT_REGISTER_TEST
(
MissionItemTest
)
const
MissionItemTest
::
ItemInfo_t
MissionItemTest
::
_rgItemInfo
[]
=
{
const
MissionItemTest
::
ItemInfo_t
MissionItemTest
::
_rgItemInfo
[]
=
{
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_WAYPOINT
,
10.0
,
20.0
,
30.0
,
1.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
},
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_WAYPOINT
,
10.0
,
20.0
,
30.0
,
1.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
},
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_UNLIM
,
10.0
,
20.0
,
30.0
,
1.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
},
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_UNLIM
,
10.0
,
20.0
,
30.0
,
1.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
},
...
...
src/MissionManager/MissionControllerTest.cc
View file @
193e7f8b
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
#include "LinkManager.h"
#include "LinkManager.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
UT_REGISTER_TEST
(
MissionControllerTest
)
MissionControllerTest
::
MissionControllerTest
(
void
)
MissionControllerTest
::
MissionControllerTest
(
void
)
:
_multiSpyMissionController
(
NULL
)
:
_multiSpyMissionController
(
NULL
)
,
_multiSpyMissionItem
(
NULL
)
,
_multiSpyMissionItem
(
NULL
)
...
...
src/MissionManager/MissionManagerTest.cc
View file @
193e7f8b
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
#include "LinkManager.h"
#include "LinkManager.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MissionManagerTest)
const
MissionManagerTest
::
TestCase_t
MissionManagerTest
::
_rgTestCases
[]
=
{
const
MissionManagerTest
::
TestCase_t
MissionManagerTest
::
_rgTestCases
[]
=
{
{
"0
\t
0
\t
3
\t
16
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
0
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_WAYPOINT
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"0
\t
0
\t
3
\t
16
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
0
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_WAYPOINT
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"1
\t
0
\t
3
\t
17
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_UNLIM
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"1
\t
0
\t
3
\t
17
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
1
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_UNLIM
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
...
...
src/VehicleSetup/SetupViewTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
UT_REGISTER_TEST
(
SetupViewTest
)
void
SetupViewTest
::
_clickThrough_test
(
void
)
void
SetupViewTest
::
_clickThrough_test
(
void
)
{
{
_connectMockLink
();
_connectMockLink
();
...
...
src/qgcunittest/FileDialogTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "FileDialogTest.h"
#include "FileDialogTest.h"
#include "QGCFileDialog.h"
#include "QGCFileDialog.h"
UT_REGISTER_TEST
(
FileDialogTest
)
FileDialogTest
::
FileDialogTest
(
void
)
FileDialogTest
::
FileDialogTest
(
void
)
{
{
...
...
src/qgcunittest/FileManagerTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "UAS.h"
#include "UAS.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
//UT_REGISTER_TEST(FileManagerTest)
FileManagerTest
::
FileManagerTest
(
void
)
FileManagerTest
::
FileManagerTest
(
void
)
:
_fileServer
(
NULL
)
:
_fileServer
(
NULL
)
,
_fileManager
(
NULL
)
,
_fileManager
(
NULL
)
...
...
src/qgcunittest/FlightGearTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
///
///
/// @author Don Gagne <don@thegagnes.com>
/// @author Don Gagne <don@thegagnes.com>
UT_REGISTER_TEST
(
FlightGearUnitTest
)
FlightGearUnitTest
::
FlightGearUnitTest
(
void
)
FlightGearUnitTest
::
FlightGearUnitTest
(
void
)
{
{
...
...
src/qgcunittest/GeoTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "GeoTest.h"
#include "GeoTest.h"
#include "QGCGeo.h"
#include "QGCGeo.h"
UT_REGISTER_TEST
(
GeoTest
)
/*
/*
GeoTest::GeoTest(void)
GeoTest::GeoTest(void)
{
{
...
...
src/qgcunittest/LinkManagerTest.cc
View file @
193e7f8b
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
#include "MockLink.h"
#include "MockLink.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
UT_REGISTER_TEST
(
LinkManagerTest
)
LinkManagerTest
::
LinkManagerTest
(
void
)
:
LinkManagerTest
::
LinkManagerTest
(
void
)
:
_linkMgr
(
NULL
),
_linkMgr
(
NULL
),
_multiSpy
(
NULL
)
_multiSpy
(
NULL
)
...
...
src/qgcunittest/MainWindowTest.cc
View file @
193e7f8b
...
@@ -31,9 +31,6 @@
...
@@ -31,9 +31,6 @@
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
// FIXME: Temporarily turned off
//UT_REGISTER_TEST(MainWindowTest)
void
MainWindowTest
::
_connectWindowClose_test
(
MAV_AUTOPILOT
autopilot
)
void
MainWindowTest
::
_connectWindowClose_test
(
MAV_AUTOPILOT
autopilot
)
{
{
_createMainWindow
();
_createMainWindow
();
...
...
src/qgcunittest/MavlinkLogTest.cc
View file @
193e7f8b
...
@@ -34,9 +34,6 @@
...
@@ -34,9 +34,6 @@
#include "UAS.h"
#include "UAS.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MavlinkLogTest)
const
char
*
MavlinkLogTest
::
_tempLogFileTemplate
=
"FlightDataXXXXXX"
;
///< Template for temporary log file
const
char
*
MavlinkLogTest
::
_tempLogFileTemplate
=
"FlightDataXXXXXX"
;
///< Template for temporary log file
const
char
*
MavlinkLogTest
::
_logFileExtension
=
"mavlink"
;
///< Extension for log files
const
char
*
MavlinkLogTest
::
_logFileExtension
=
"mavlink"
;
///< Extension for log files
const
char
*
MavlinkLogTest
::
_saveLogFilename
=
"qgroundcontrol.mavlink.ut"
;
///< Filename to save log files to
const
char
*
MavlinkLogTest
::
_saveLogFilename
=
"qgroundcontrol.mavlink.ut"
;
///< Filename to save log files to
...
...
src/qgcunittest/MessageBoxTest.cc
View file @
193e7f8b
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "MessageBoxTest.h"
#include "MessageBoxTest.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
UT_REGISTER_TEST
(
MessageBoxTest
)
MessageBoxTest
::
MessageBoxTest
(
void
)
MessageBoxTest
::
MessageBoxTest
(
void
)
{
{
...
...
src/qgcunittest/PX4RCCalibrationTest.cc
View file @
193e7f8b
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
///
///
/// @author Don Gagne <don@thegagnes.com>
/// @author Don Gagne <don@thegagnes.com>
UT_REGISTER_TEST
(
RadioConfigTest
)
QGC_LOGGING_CATEGORY
(
RadioConfigTestLog
,
"RadioConfigTestLog"
)
QGC_LOGGING_CATEGORY
(
RadioConfigTestLog
,
"RadioConfigTestLog"
)
// This will check for the wizard buttons being enabled of disabled according to the mask you pass in.
// This will check for the wizard buttons being enabled of disabled according to the mask you pass in.
...
...
src/qgcunittest/TCPLinkTest.cc
View file @
193e7f8b
...
@@ -29,10 +29,6 @@
...
@@ -29,10 +29,6 @@
///
///
/// @author Don Gagne <don@thegagnes.com>
/// @author Don Gagne <don@thegagnes.com>
// This unit test has gotten too flaky to run reliably under TeamCity. Removing for now till there is
// time to debug.
//UT_REGISTER_TEST(TCPLinkUnitTest)
TCPLinkUnitTest
::
TCPLinkUnitTest
(
void
)
TCPLinkUnitTest
::
TCPLinkUnitTest
(
void
)
:
_config
(
NULL
)
:
_config
(
NULL
)
,
_link
(
NULL
)
,
_link
(
NULL
)
...
...
src/qgcunittest/UnitTest.h
View file @
193e7f8b
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include "LinkInterface.h"
#include "LinkInterface.h"
#define UT_REGISTER_TEST(className) static UnitTestWrapper<className>
t
(#className);
#define UT_REGISTER_TEST(className) static UnitTestWrapper<className>
className
(#className);
class
QGCMessageBox
;
class
QGCMessageBox
;
class
QGCFileDialog
;
class
QGCFileDialog
;
...
...
src/qgcunittest/UnitTestList.cc
0 → 100644
View file @
193e7f8b
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
// We keep the list of all unit tests in a global location so it's easier to see which
// ones are enabled/disabled
#include "FactSystemTestGeneric.h"
#include "FactSystemTestPX4.h"
#include "FileDialogTest.h"
#include "FlightGearTest.h"
#include "GeoTest.h"
#include "LinkManagerTest.h"
#include "MessageBoxTest.h"
#include "MissionItemTest.h"
#include "MissionControllerTest.h"
#include "PX4RCCalibrationTest.h"
#include "SetupViewTest.h"
#include "MavlinkLogTest.h"
UT_REGISTER_TEST
(
FactSystemTestGeneric
)
UT_REGISTER_TEST
(
FactSystemTestPX4
)
UT_REGISTER_TEST
(
FileDialogTest
)
UT_REGISTER_TEST
(
FlightGearUnitTest
)
UT_REGISTER_TEST
(
GeoTest
)
UT_REGISTER_TEST
(
LinkManagerTest
)
UT_REGISTER_TEST
(
MavlinkLogTest
)
UT_REGISTER_TEST
(
MessageBoxTest
)
UT_REGISTER_TEST
(
MissionItemTest
)
UT_REGISTER_TEST
(
MissionControllerTest
)
UT_REGISTER_TEST
(
RadioConfigTest
)
UT_REGISTER_TEST
(
SetupViewTest
)
// List of unit test which are currently disabled.
// If disabling a new test, include reason in comment.
// Why is this one off?
//UT_REGISTER_TEST(FileManagerTest)
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MainWindowTest)
// FIXME: Temporarily disabled until this can be stabilized
// FIXME: Temporarily disabled until this can be stabilized
//UT_REGISTER_TEST(MissionManagerTest)
// This unit test has gotten too flaky to run reliably under TeamCity. Removing for now till there is
// time to debug.
//UT_REGISTER_TEST(TCPLinkUnitTest)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment