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
65da5b36
Commit
65da5b36
authored
Oct 23, 2018
by
Patrick José Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qgcunittest: Change from foreach to c++11 for
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
29db9519
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
MavlinkLogTest.cc
src/qgcunittest/MavlinkLogTest.cc
+1
-1
RadioConfigTest.cc
src/qgcunittest/RadioConfigTest.cc
+2
-2
UnitTest.cc
src/qgcunittest/UnitTest.cc
+1
-1
No files found.
src/qgcunittest/MavlinkLogTest.cc
View file @
65da5b36
...
...
@@ -38,7 +38,7 @@ void MavlinkLogTest::init(void)
// Make sure temp directory is clear of mavlink logs
QDir
tmpDir
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
TempLocation
));
QStringList
logFiles
(
tmpDir
.
entryList
(
QStringList
(
QString
(
"*.%1"
).
arg
(
_logFileExtension
)),
QDir
::
Files
));
for
each
(
const
QString
&
logFile
,
logFiles
)
{
for
(
const
QString
&
logFile
:
logFiles
)
{
bool
success
=
tmpDir
.
remove
(
logFile
);
Q_UNUSED
(
success
);
Q_ASSERT
(
success
);
...
...
src/qgcunittest/RadioConfigTest.cc
View file @
65da5b36
...
...
@@ -207,7 +207,7 @@ void RadioConfigTest::_init(MAV_AUTOPILOT firmwareType)
// Find the radio component
QObject
*
vehicleComponent
=
NULL
;
for
each
(
const
QVariant
&
varVehicleComponent
,
_autopilot
->
vehicleComponents
())
{
for
(
const
QVariant
&
varVehicleComponent
:
_autopilot
->
vehicleComponents
())
{
if
(
firmwareType
==
MAV_AUTOPILOT_PX4
)
{
PX4RadioComponent
*
radioComponent
=
qobject_cast
<
PX4RadioComponent
*>
(
varVehicleComponent
.
value
<
VehicleComponent
*>
());
if
(
radioComponent
)
{
...
...
@@ -370,7 +370,7 @@ void RadioConfigTest::_fullCalibrationWorker(MAV_AUTOPILOT firmwareType)
QStringList
switchList
;
switchList
<<
"RC_MAP_MODE_SW"
<<
"RC_MAP_LOITER_SW"
<<
"RC_MAP_RETURN_SW"
<<
"RC_MAP_POSCTL_SW"
<<
"RC_MAP_ACRO_SW"
;
for
each
(
const
QString
&
switchParam
,
switchList
)
{
for
(
const
QString
&
switchParam
:
switchList
)
{
Q_ASSERT
(
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
switchParam
)
->
rawValue
().
toInt
()
!=
channel
+
1
);
}
}
...
...
src/qgcunittest/UnitTest.cc
View file @
65da5b36
...
...
@@ -81,7 +81,7 @@ int UnitTest::run(QString& singleTest)
{
int
ret
=
0
;
for
each
(
QObject
*
test
,
_testList
())
{
for
(
QObject
*
test
:
_testList
())
{
if
(
singleTest
.
isEmpty
()
||
singleTest
==
test
->
objectName
())
{
QStringList
args
;
args
<<
"*"
<<
"-maxwarnings"
<<
"0"
;
...
...
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