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
aece8fa6
Commit
aece8fa6
authored
Jul 31, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
c2bfd944
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
76 deletions
+146
-76
SimpleMissionItemTest.cc
src/MissionManager/SimpleMissionItemTest.cc
+115
-40
SimpleMissionItemTest.h
src/MissionManager/SimpleMissionItemTest.h
+31
-36
No files found.
src/MissionManager/SimpleMissionItemTest.cc
View file @
aece8fa6
This diff is collapsed.
Click to expand it.
src/MissionManager/SimpleMissionItemTest.h
View file @
aece8fa6
...
...
@@ -13,6 +13,26 @@
#include "SimpleMissionItem.h"
/// Unit test for SimpleMissionItem
typedef
struct
{
MAV_CMD
command
;
MAV_FRAME
frame
;
}
ItemInfo_t
;
typedef
struct
{
const
char
*
name
;
QGCMAVLink
::
VehicleClass_t
vehicleClass
;
bool
nanValue
;
int
paramIndex
;
}
FactValue_t
;
typedef
struct
{
size_t
cFactValues
;
const
FactValue_t
*
rgFactValues
;
double
altValue
;
QGroundControlQmlGlobal
::
AltitudeMode
altMode
;
}
ItemExpected_t
;
class
SimpleMissionItemTest
:
public
VisualMissionItemTest
{
Q_OBJECT
...
...
@@ -20,18 +40,18 @@ class SimpleMissionItemTest : public VisualMissionItemTest
public:
SimpleMissionItemTest
(
void
);
void
init
(
void
)
override
;
void
init
(
void
)
override
;
void
cleanup
(
void
)
override
;
private
slots
:
void
_testSignals
(
void
);
void
_testEditorFacts
(
void
);
void
_testDefaultValues
(
void
);
void
_testCameraSectionDirty
(
void
);
void
_testSpeedSectionDirty
(
void
);
void
_testCameraSection
(
void
);
void
_testSpeedSection
(
void
);
void
_testAltitudePropogation
(
void
);
void
_testSignals
(
void
);
void
_testEditorFacts
(
void
);
void
_testDefaultValues
(
void
);
void
_testCameraSectionDirty
(
void
);
void
_testSpeedSectionDirty
(
void
);
void
_testCameraSection
(
void
);
void
_testSpeedSection
(
void
);
void
_testAltitudePropogation
(
void
);
private:
enum
{
...
...
@@ -58,35 +78,10 @@ private:
static
const
size_t
cSimpleItemSignals
=
maxSignalIndex
;
const
char
*
rgSimpleItemSignals
[
cSimpleItemSignals
];
typedef
struct
{
MAV_CMD
command
;
MAV_FRAME
frame
;
}
ItemInfo_t
;
typedef
struct
{
const
char
*
name
;
double
value
;
}
FactValue_t
;
typedef
struct
{
size_t
cFactValues
;
const
FactValue_t
*
rgFactValues
;
double
altValue
;
QGroundControlQmlGlobal
::
AltitudeMode
altMode
;
}
ItemExpected_t
;
void
_testEditorFactsWorker
(
QGCMAVLink
::
VehicleClass_t
vehicleClass
,
QGCMAVLink
::
VehicleClass_t
vtolMode
,
const
ItemExpected_t
*
rgExpected
);
bool
_classMatch
(
QGCMAVLink
::
VehicleClass_t
vehicleClass
,
QGCMAVLink
::
VehicleClass_t
testClass
);
SimpleMissionItem
*
_simpleItem
;
MultiSignalSpy
*
_spySimpleItem
;
MultiSignalSpy
*
_spyVisualItem
;
static
const
ItemInfo_t
_rgItemInfo
[];
static
const
ItemExpected_t
_rgItemExpected
[];
static
const
FactValue_t
_rgFactValuesWaypoint
[];
static
const
FactValue_t
_rgFactValuesLoiterUnlim
[];
static
const
FactValue_t
_rgFactValuesLoiterTurns
[];
static
const
FactValue_t
_rgFactValuesLoiterTime
[];
static
const
FactValue_t
_rgFactValuesLand
[];
static
const
FactValue_t
_rgFactValuesTakeoff
[];
static
const
FactValue_t
_rgFactValuesConditionDelay
[];
static
const
FactValue_t
_rgFactValuesDoJump
[];
};
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