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
9507d24c
Commit
9507d24c
authored
Jun 22, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated unit test support
parent
53a49fdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
UnitTest.cc
src/qgcunittest/UnitTest.cc
+8
-1
UnitTest.h
src/qgcunittest/UnitTest.h
+3
-0
No files found.
src/qgcunittest/UnitTest.cc
View file @
9507d24c
...
...
@@ -198,6 +198,13 @@ void UnitTest::checkExpectedMessageBox(int expectFailFlags)
QCOMPARE
(
messageBoxRespondedTo
,
true
);
}
void
UnitTest
::
checkMultipleExpectedMessageBox
(
int
messageCount
)
{
int
missedMessageBoxCount
=
_missedMessageBoxCount
;
_missedMessageBoxCount
=
0
;
QCOMPARE
(
missedMessageBoxCount
,
messageCount
);
}
void
UnitTest
::
checkExpectedFileDialog
(
int
expectFailFlags
)
{
// Internal testing
...
...
@@ -377,7 +384,7 @@ void UnitTest::_connectMockLink(MAV_AUTOPILOT autopilot)
// Wait for the Vehicle to get created
QSignalSpy
spyVehicle
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
(),
SIGNAL
(
parameterReadyVehicleAvailableChanged
(
bool
)));
QCOMPARE
(
spyVehicle
.
wait
(
5
000
),
true
);
QCOMPARE
(
spyVehicle
.
wait
(
10
000
),
true
);
QVERIFY
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
parameterReadyVehicleAvailable
());
_vehicle
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
activeVehicle
();
QVERIFY
(
_vehicle
);
...
...
src/qgcunittest/UnitTest.h
View file @
9507d24c
...
...
@@ -74,6 +74,9 @@ public:
// @param Expected failure response flags
void
checkExpectedMessageBox
(
int
expectFailFlags
=
expectFailNoFailure
);
/// Checks that the specified number of message boxes where shown. Do not call setExpectedMessageBox when using this method.
void
checkMultipleExpectedMessageBox
(
int
messageCount
);
/// @brief Check whether a message box was displayed and correctly responded to
// @param Expected failure response flags
void
checkExpectedFileDialog
(
int
expectFailFlags
=
expectFailNoFailure
);
...
...
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