Commit 9507d24c authored by Don Gagne's avatar Don Gagne

Updated unit test support

parent 53a49fdc
......@@ -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(5000), true);
QCOMPARE(spyVehicle.wait(10000), true);
QVERIFY(qgcApp()->toolbox()->multiVehicleManager()->parameterReadyVehicleAvailable());
_vehicle = qgcApp()->toolbox()->multiVehicleManager()->activeVehicle();
QVERIFY(_vehicle);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment