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
78d81e6c
Commit
78d81e6c
authored
Oct 18, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2037 from DonLakeFlyer/UnitTests
Unit tests
parents
5a26408e
3efd0a10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
QGCApplication.pro
QGCApplication.pro
+13
-2
MainWindowTest.h
src/qgcunittest/MainWindowTest.h
+5
-1
UnitTest.cc
src/qgcunittest/UnitTest.cc
+3
-0
No files found.
QGCApplication.pro
View file @
78d81e6c
...
...
@@ -457,7 +457,6 @@ HEADERS += \
src
/
qgcunittest
/
FileManagerTest
.
h
\
src
/
qgcunittest
/
FlightGearTest
.
h
\
src
/
qgcunittest
/
LinkManagerTest
.
h
\
src
/
qgcunittest
/
MainWindowTest
.
h
\
src
/
qgcunittest
/
MavlinkLogTest
.
h
\
src
/
qgcunittest
/
MessageBoxTest
.
h
\
src
/
qgcunittest
/
MultiSignalSpy
.
h
\
...
...
@@ -477,7 +476,6 @@ SOURCES += \
src
/
qgcunittest
/
FileManagerTest
.
cc
\
src
/
qgcunittest
/
FlightGearTest
.
cc
\
src
/
qgcunittest
/
LinkManagerTest
.
cc
\
src
/
qgcunittest
/
MainWindowTest
.
cc
\
src
/
qgcunittest
/
MavlinkLogTest
.
cc
\
src
/
qgcunittest
/
MessageBoxTest
.
cc
\
src
/
qgcunittest
/
MultiSignalSpy
.
cc
\
...
...
@@ -487,6 +485,19 @@ SOURCES += \
src
/
qgcunittest
/
UnitTest
.
cc
\
src
/
VehicleSetup
/
SetupViewTest
.
cc
\
!
WindowsDebugAndRelease
{
#
This
specific
unit
test
seems
to
create
havoc
on
Windows
.
Likely
due
to
#
creating
/
destroying
a
main
window
multiple
times
without
destorying
the
#
QApplication
.
The
Qml
destruction
sequence
is
quite
odd
in
that
it
is
#
all
delayed
until
it
gets
back
the
event
loop
.
Which
likely
has
something
#
to
do
with
the
issue
.
HEADERS
+=
\
src
/
qgcunittest
/
MainWindowTest
.
h
\
SOURCES
+=
\
src
/
qgcunittest
/
MainWindowTest
.
cc
\
}
}
#
DebugBuild
|
WindowsDebugAndRelease
}
#
MobileBuild
...
...
src/qgcunittest/MainWindowTest.h
View file @
78d81e6c
...
...
@@ -44,9 +44,13 @@ private slots:
void
cleanup
(
void
);
void
_connectWindowClosePX4_test
(
void
);
void
_connectWindowCloseGeneric_test
(
void
);
private:
// This is moved to private so that it does not run. It exposes
// a strange ASSERT inthe jscript engine which seems to be only
// related to running this Qml in unit tests.
void
_connectWindowCloseGeneric_test
(
void
);
void
_connectWindowClose_test
(
MAV_AUTOPILOT
autopilot
);
MainWindow
*
_mainWindow
;
...
...
src/qgcunittest/UnitTest.cc
View file @
78d81e6c
...
...
@@ -128,6 +128,9 @@ void UnitTest::cleanup(void)
{
_cleanupCalled
=
true
;
// We add a slight delay here to allow for deleteLater and Qml cleanup
QTest
::
qWait
(
200
);
// Keep in mind that any code below these QCOMPARE may be skipped if the compare fails
if
(
_expectMissedMessageBox
)
{
QEXPECT_FAIL
(
""
,
"Expecting failure due internal testing"
,
Continue
);
...
...
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