Commit 2cd9ce2d authored by Don Gagne's avatar Don Gagne

Merge pull request #2170 from DonLakeFlyer/UT

Unit Tests that will run with QT_FATAL_WARNINGS=1
parents 099c7a0a 73d508b2
...@@ -22,7 +22,7 @@ matrix: ...@@ -22,7 +22,7 @@ matrix:
sudo: false sudo: false
- os: osx - os: osx
osx_image: xcode7 osx_image: xcode7
env: SPEC=macx-clang CONFIG=debug env: SPEC=macx-clang CONFIG=debug QT_FATAL_WARNINGS=1
- os: osx - os: osx
osx_image: xcode7 osx_image: xcode7
env: SPEC=macx-clang CONFIG=installer env: SPEC=macx-clang CONFIG=installer
......
...@@ -63,10 +63,6 @@ void SetupViewTest::_clickThrough_test(void) ...@@ -63,10 +63,6 @@ void SetupViewTest::_clickThrough_test(void)
QTest::qWait(1000); QTest::qWait(1000);
} }
// On MainWindow close we should get a message box telling the user to disconnect first. _disconnectMockLink();
setExpectedMessageBox(QGCMessageBox::Yes);
_closeMainWindow(); _closeMainWindow();
checkExpectedMessageBox();
} }
...@@ -417,5 +417,9 @@ void UnitTest::_closeMainWindow(bool cancelExpected) ...@@ -417,5 +417,9 @@ void UnitTest::_closeMainWindow(bool cancelExpected)
mainWindowSpy.wait(2000); mainWindowSpy.wait(2000);
QCOMPARE(mainWindowSpy.count(), cancelExpected ? 0 : 1); QCOMPARE(mainWindowSpy.count(), cancelExpected ? 0 : 1);
// This leaves enough time for any dangling Qml components to get cleaned up.
// This prevents qWarning from bad references in Qml
QTest::qWait(1000);
} }
} }
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