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
90fb522e
Commit
90fb522e
authored
Nov 30, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to call UnitTest::[init|cleanup]TestCase
parent
6592a881
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
22 deletions
+3
-22
MessageBoxTest.cc
src/qgcunittest/MessageBoxTest.cc
+3
-13
MessageBoxTest.h
src/qgcunittest/MessageBoxTest.h
+0
-5
PX4RCCalibrationTest.cc
src/qgcunittest/PX4RCCalibrationTest.cc
+0
-2
QGCUASFileManagerTest.cc
src/qgcunittest/QGCUASFileManagerTest.cc
+0
-2
No files found.
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 failure
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
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