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
9ff341a0
Commit
9ff341a0
authored
Jan 11, 2011
by
Mariano Lizarraga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started the scaffold for unit testing UAS class
parent
2eb32cd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
177 additions
and
0 deletions
+177
-0
qgcunittest.pro
qgcunittest.pro
+137
-0
tst_uasunittest.cc
qgcunittest/tst_uasunittest.cc
+40
-0
No files found.
qgcunittest.pro
0 → 100644
View file @
9ff341a0
#-------------------------------------------------
#
#
Project
created
by
QtCreator
2011
-
01
-
11
T08
:
54
:
37
#
#-------------------------------------------------
QT
+=
network
\
phonon
\
testlib
\
svg
TEMPLATE
=
app
TARGET
=
tst_uasunittest
BASEDIR
=
$$
IN_PWD
TESTDIR
=
$$
BASEDIR
/
qgcunittest
TARGETDIR
=
$$
OUT_PWD
BUILDDIR
=
$$
TARGETDIR
/
build
LANGUAGE
=
C
++
CONFIG
+=
console
CONFIG
-=
app_bundle
OBJECTS_DIR
=
$$
BUILDDIR
/
obj
MOC_DIR
=
$$
BUILDDIR
/
moc
UI_HEADERS_DIR
=
src
/
ui
/
generated
MAVLINK_CONF
=
""
#
If
the
user
config
file
exists
,
it
will
be
included
.
#
if
the
variable
MAVLINK_CONF
contains
the
name
of
an
#
additional
project
,
QGroundControl
includes
the
support
#
of
custom
MAVLink
messages
of
this
project
exists
(
user_config
.
pri
)
{
include
(
user_config
.
pri
)
message
(
"----- USING CUSTOM USER QGROUNDCONTROL CONFIG FROM user_config.pri -----"
)
message
(
"Adding support for additional MAVLink messages for: "
$$
MAVLINK_CONF
)
message
(
"------------------------------------------------------------------------"
)
}
INCLUDEPATH
+=
$$
BASEDIR
/../
mavlink
/
include
/
common
contains
(
MAVLINK_CONF
,
pixhawk
)
{
#
Remove
the
default
set
-
it
is
included
anyway
INCLUDEPATH
-=
$$
BASEDIR
/../
mavlink
/
include
/
common
#
PIXHAWK
SPECIAL
MESSAGES
INCLUDEPATH
+=
$$
BASEDIR
/../
mavlink
/
include
/
pixhawk
DEFINES
+=
QGC_USE_PIXHAWK_MESSAGES
}
contains
(
MAVLINK_CONF
,
slugs
)
{
#
Remove
the
default
set
-
it
is
included
anyway
INCLUDEPATH
-=
$$
BASEDIR
/../
mavlink
/
include
/
common
#
SLUGS
SPECIAL
MESSAGES
INCLUDEPATH
+=
$$
BASEDIR
/../
mavlink
/
include
/
slugs
DEFINES
+=
QGC_USE_SLUGS_MESSAGES
}
contains
(
MAVLINK_CONF
,
ualberta
)
{
#
Remove
the
default
set
-
it
is
included
anyway
INCLUDEPATH
-=
$$
BASEDIR
/../
mavlink
/
include
/
common
#
UALBERTA
SPECIAL
MESSAGES
INCLUDEPATH
+=
$$
BASEDIR
/../
mavlink
/
include
/
ualberta
DEFINES
+=
QGC_USE_UALBERTA_MESSAGES
}
contains
(
MAVLINK_CONF
,
ardupilotmega
)
{
#
Remove
the
default
set
-
it
is
included
anyway
INCLUDEPATH
-=
$$
BASEDIR
/../
mavlink
/
include
/
common
#
UALBERTA
SPECIAL
MESSAGES
INCLUDEPATH
+=
$$
BASEDIR
/../
mavlink
/
include
/
ardupilotmega
DEFINES
+=
QGC_USE_ARDUPILOTMEGA_MESSAGES
}
#
Include
general
settings
for
MAVGround
#
necessary
as
last
include
to
override
any
non
-
acceptable
settings
#
done
by
the
plugins
above
include
(
qgroundcontrol
.
pri
)
#
QWT
plot
and
QExtSerial
depend
on
paths
set
by
qgroundcontrol
.
pri
#
Include
serial
port
library
include
(
src
/
lib
/
qextserialport
/
qextserialport
.
pri
)
#
Include
QWT
plotting
library
include
(
src
/
lib
/
qwt
/
qwt
.
pri
)
DEPENDPATH
+=
.
\
lib
/
QMapControl
\
lib
/
QMapControl
/
src
\
plugins
INCLUDEPATH
+=
.
\
lib
/
QMapControl
\
$$
BASEDIR
/../
mavlink
/
include
\
$$
BASEDIR
/
src
/
uas
\
$$
BASEDIR
/
src
/
comm
\
$$
BASEDIR
/
src
/
\
$$
BASEDIR
/
src
/
ui
/
RadioCalibration
\
$$
BASEDIR
/
src
/
ui
/
\
SOURCES
+=
$$
TESTDIR
/
tst_uasunittest
.
cc
\
src
/
uas
/
UAS
.
cc
\
src
/
comm
/
MAVLinkProtocol
.
cc
\
src
/
uas
/
UASWaypointManager
.
cc
\
src
/
Waypoint
.
cc
\
src
/
ui
/
RadioCalibration
/
RadioCalibrationData
.
cc
\
src
/
uas
/
SlugsMAV
.
cc
\
src
/
uas
/
PxQuadMAV
.
cc
\
src
/
uas
/
ArduPilotMegaMAV
.
cc
\
src
/
GAudioOutput
.
cc
\
src
/
uas
/
UASManager
.
cc
\
src
/
comm
/
LinkManager
.
cc
\
src
/
QGC
.
cc
\
src
/
comm
/
SerialLink
.
cc
\
HEADERS
+=
src
/
uas
/
UASInterface
.
h
\
src
/
uas
/
UAS
.
h
\
src
/
comm
/
MAVLinkProtocol
.
h
\
src
/
comm
/
ProtocolInterface
.
h
\
src
/
uas
/
UASWaypointManager
.
h
\
src
/
Waypoint
.
h
\
src
/
ui
/
RadioCalibration
/
RadioCalibrationData
.
h
\
src
/
uas
/
SlugsMAV
.
h
\
src
/
uas
/
PxQuadMAV
.
h
\
src
/
uas
/
ArduPilotMegaMAV
.
h
\
src
/
GAudioOutput
.
h
\
src
/
uas
/
UASManager
.
h
\
src
/
comm
/
LinkManager
.
h
\
src
/
comm
/
LinkInterface
.
h
\
src
/
QGC
.
h
\
src
/
comm
/
SerialLinkInterface
.
h
\
src
/
comm
/
SerialLink
.
h
\
DEFINES
+=
SRCDIR
=
\\\
"$$PWD/\\\"
qgcunittest/tst_uasunittest.cc
0 → 100644
View file @
9ff341a0
#include <QtCore/QString>
#include <QtTest/QtTest>
#include "UAS.h"
#include "MAVLinkProtocol.h"
class
UASUnitTest
:
public
QObject
{
Q_OBJECT
public:
UASUnitTest
();
private
Q_SLOTS
:
void
initTestCase
();
void
cleanupTestCase
();
void
testCase1
();
};
UASUnitTest
::
UASUnitTest
()
{
}
void
UASUnitTest
::
initTestCase
()
{
MAVLinkProtocol
*
mav
=
new
MAVLinkProtocol
();
UAS
*
prueba
=
new
UAS
(
mav
,
0
);
}
void
UASUnitTest
::
cleanupTestCase
()
{
}
void
UASUnitTest
::
testCase1
()
{
QVERIFY2
(
true
,
"Failure"
);
}
QTEST_APPLESS_MAIN
(
UASUnitTest
);
#include "tst_uasunittest.moc"
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