Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
a45a5756
Commit
a45a5756
authored
11 years ago
by
Don Gagne
Browse files
Options
Downloads
Patches
Plain Diff
AutoTest runner is now part of main
parent
0526d3be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main.cc
+23
-1
23 additions, 1 deletion
src/main.cc
src/qgcunittest/testSuite.cc
+0
-28
0 additions, 28 deletions
src/qgcunittest/testSuite.cc
with
23 additions
and
29 deletions
src/main.cc
+
23
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
src/qgcunittest/testSuite.cc
deleted
100755 → 0
+
0
−
28
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment