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
9507d24c
Commit
9507d24c
authored
Jun 22, 2016
by
Don Gagne
Browse files
Updated unit test support
parent
53a49fdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
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