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
90fb522e
Commit
90fb522e
authored
Nov 30, 2014
by
Don Gagne
Browse files
No need to call UnitTest::[init|cleanup]TestCase
parent
6592a881
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/qgcunittest/MessageBoxTest.cc
View file @
90fb522e
...
...
@@ -31,21 +31,11 @@
UT_REGISTER_TEST
(
MessageBoxTest
)
MessageBoxTest
::
MessageBoxTest
(
void
)
:
_expectMissedMessageBox
(
false
)
MessageBoxTest
::
MessageBoxTest
(
void
)
{
}
void
MessageBoxTest
::
cleanup
(
void
)
{
if
(
_expectMissedMessageBox
)
{
_expectMissedMessageBox
=
false
;
QEXPECT_FAIL
(
""
,
"Supposed to fail in cleanup with a missed message box"
,
Continue
);
}
UnitTest
::
cleanup
();
}
void
MessageBoxTest
::
_messageBoxExpected_test
(
void
)
{
setExpectedMessageBox
(
QMessageBox
::
Ok
);
...
...
@@ -57,7 +47,7 @@ void MessageBoxTest::_messageBoxExpected_test(void)
void
MessageBoxTest
::
_messageBoxUnexpected_test
(
void
)
{
// This should cause
the test to
fail in the cleanup method
// This should cause
an expected
fail
ure
in the cleanup method
QGCMessageBox
::
information
(
QString
(),
QString
());
_expectMissedMessageBox
=
true
;
}
...
...
@@ -75,7 +65,7 @@ void MessageBoxTest::_previousMessageBox_test(void)
void
MessageBoxTest
::
_noMessageBox_test
(
void
)
{
setExpectedMessageBox
(
QMessageBox
::
Ok
);
checkExpectedMessageBox
(
expectFailNo
MessageBox
);
checkExpectedMessageBox
(
expectFailNo
Dialog
);
}
void
MessageBoxTest
::
_badResponseButton_test
(
void
)
...
...
src/qgcunittest/MessageBoxTest.h
View file @
90fb522e
...
...
@@ -39,16 +39,11 @@ public:
MessageBoxTest
(
void
);
private
slots
:
void
cleanup
(
void
);
void
_messageBoxExpected_test
(
void
);
void
_messageBoxUnexpected_test
(
void
);
void
_previousMessageBox_test
(
void
);
void
_noMessageBox_test
(
void
);
void
_badResponseButton_test
(
void
);
private:
bool
_expectMissedMessageBox
;
};
#endif
src/qgcunittest/PX4RCCalibrationTest.cc
View file @
90fb522e
...
...
@@ -139,8 +139,6 @@ PX4RCCalibrationTest::PX4RCCalibrationTest(void) :
/// @brief Called one time before any test cases are run.
void
PX4RCCalibrationTest
::
initTestCase
(
void
)
{
UnitTest
::
initTestCase
();
// Validate that our function to channel mapping is still correct.
for
(
int
function
=
0
;
function
<
PX4RCCalibration
::
rcCalFunctionMax
;
function
++
)
{
int
chanIndex
=
_rgFunctionChannelMap
[
function
];
...
...
src/qgcunittest/QGCUASFileManagerTest.cc
View file @
90fb522e
...
...
@@ -42,8 +42,6 @@ QGCUASFileManagerUnitTest::QGCUASFileManagerUnitTest(void) :
// Called once before all test cases are run
void
QGCUASFileManagerUnitTest
::
initTestCase
(
void
)
{
UnitTest
::
initTestCase
();
_mockUAS
.
setMockSystemId
(
_systemIdServer
);
_mockUAS
.
setMockMavlinkPlugin
(
&
_mockFileServer
);
}
...
...
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