Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6532f686
Commit
6532f686
authored
Jun 18, 2017
by
DonLakeFlyer
Browse files
Rename unit test location
parent
590ea791
Changes
3
Hide whitespace changes
Inline
Side-by-side
UnitTest.qrc
View file @
6532f686
<RCC>
<qresource prefix="/json/unittest">
<qresource prefix="/unittest">
<file alias="SectionTest.plan">src/MissionManager/UnitTest/SectionTest.plan</file>
<file alias="MavCmdInfoCommon.json">src/MissionManager/UnitTest/MavCmdInfoCommon.json</file>
<file alias="MavCmdInfoFixedWing.json">src/MissionManager/UnitTest/MavCmdInfoFixedWing.json</file>
<file alias="MavCmdInfoMultiRotor.json">src/MissionManager/UnitTest/MavCmdInfoMultiRotor.json</file>
...
...
src/MissionManager/MissionCommandTree.cc
View file @
6532f686
...
...
@@ -38,12 +38,12 @@ void MissionCommandTree::setToolbox(QGCToolbox* toolbox)
#ifdef UNITTEST_BUILD
if
(
_unitTest
)
{
// Load unit testing tree
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_GENERIC
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoCommon.json"
,
true
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_FIXED_WING
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoFixedWing.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_QUADROTOR
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoMultiRotor.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_VTOL_QUADROTOR
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoVTOL.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_SUBMARINE
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoSub.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_GROUND_ROVER
]
=
new
MissionCommandList
(
":/
json/
unittest/MavCmdInfoRover.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_GENERIC
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoCommon.json"
,
true
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_FIXED_WING
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoFixedWing.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_QUADROTOR
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoMultiRotor.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_VTOL_QUADROTOR
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoVTOL.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_SUBMARINE
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoSub.json"
,
false
,
this
);
_staticCommandTree
[
MAV_AUTOPILOT_GENERIC
][
MAV_TYPE_GROUND_ROVER
]
=
new
MissionCommandList
(
":/unittest/MavCmdInfoRover.json"
,
false
,
this
);
}
else
{
#endif
// Load all levels of hierarchy
...
...
src/MissionManager/PlanMasterControllerTest.cc
View file @
6532f686
...
...
@@ -40,13 +40,13 @@ void PlanMasterControllerTest::cleanup(void)
void
PlanMasterControllerTest
::
_testMissionFileLoad
(
void
)
{
_masterController
->
loadFromFile
(
":/
json/
unittest/OldFileFormat.mission"
);
_masterController
->
loadFromFile
(
":/unittest/OldFileFormat.mission"
);
QCOMPARE
(
_masterController
->
missionController
()
->
visualItems
()
->
count
(),
7
);
}
void
PlanMasterControllerTest
::
_testMissionPlannerFileLoad
(
void
)
{
_masterController
->
loadFromFile
(
":/
json/
unittest/MissionPlanner.waypoints"
);
_masterController
->
loadFromFile
(
":/unittest/MissionPlanner.waypoints"
);
QCOMPARE
(
_masterController
->
missionController
()
->
visualItems
()
->
count
(),
6
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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