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
a45a5756
Commit
a45a5756
authored
Dec 25, 2013
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AutoTest runner is now part of main
parent
0526d3be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
29 deletions
+23
-29
main.cc
src/main.cc
+23
-1
testSuite.cc
src/qgcunittest/testSuite.cc
+0
-28
No files found.
src/main.cc
View file @
a45a5756
...
...
@@ -32,7 +32,7 @@ This file is part of the QGROUNDCONTROL project
#include "QGCCore.h"
#include "MainWindow.h"
#include "configuration.h"
#include "AutoTest.h"
/* SDL does ugly things to main() */
#ifdef main
...
...
@@ -68,6 +68,28 @@ int main(int argc, char *argv[])
#ifdef Q_OS_WIN
qInstallMsgHandler
(
msgHandler
);
#endif
#ifdef QT_DEBUG
if
(
argc
>
1
&&
QString
(
argv
[
1
]).
compare
(
"--unittest"
,
Qt
::
CaseInsensitive
)
==
0
)
{
// Strip off extra command line args so QTest doesn't complain
for
(
int
i
=
1
;
i
<
argc
-
1
;
i
++
)
{
argv
[
i
]
=
argv
[
i
+
1
];
}
// Run the test
int
failures
=
AutoTest
::
run
(
argc
-
1
,
argv
);
if
(
failures
==
0
)
{
qDebug
()
<<
"ALL TESTS PASSED"
;
}
else
{
qDebug
()
<<
failures
<<
" TESTS FAILED!"
;
}
return
failures
;
}
#endif
QGCCore
*
core
=
NULL
;
int
val
;
...
...
src/qgcunittest/testSuite.cc
deleted
100755 → 0
View file @
0526d3be
/**
* @author Rob Caldecott
* @note This was obtained from http://qtcreator.blogspot.com/2010/04/sample-multiple-unit-test-project.html
*
*/
#include "AutoTest.h"
#include <QDebug>
#if 1
// This is all you need to run all the tests
TEST_MAIN
#else
// Or supply your own main function
int
main
(
int
argc
,
char
*
argv
[])
{
int
failures
=
AutoTest
::
run
(
argc
,
argv
);
if
(
failures
==
0
)
{
qDebug
()
<<
"ALL TESTS PASSED"
;
}
else
{
qDebug
()
<<
failures
<<
" TESTS FAILED!"
;
}
return
failures
;
}
#endif
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