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
ddde7cce
Commit
ddde7cce
authored
Dec 04, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Must new MockUAS otherwise qt resource system is not ready
parent
ed807d4f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
QGCUASFileManagerTest.cc
src/qgcunittest/QGCUASFileManagerTest.cc
+11
-3
QGCUASFileManagerTest.h
src/qgcunittest/QGCUASFileManagerTest.h
+2
-1
No files found.
src/qgcunittest/QGCUASFileManagerTest.cc
View file @
ddde7cce
...
...
@@ -42,8 +42,16 @@ QGCUASFileManagerUnitTest::QGCUASFileManagerUnitTest(void) :
// Called once before all test cases are run
void
QGCUASFileManagerUnitTest
::
initTestCase
(
void
)
{
_mockUAS
.
setMockSystemId
(
_systemIdServer
);
_mockUAS
.
setMockMavlinkPlugin
(
&
_mockFileServer
);
_mockUAS
=
new
MockUAS
();
Q_CHECK_PTR
(
_mockUAS
);
_mockUAS
->
setMockSystemId
(
_systemIdServer
);
_mockUAS
->
setMockMavlinkPlugin
(
&
_mockFileServer
);
}
void
QGCUASFileManagerUnitTest
::
cleanupTestCase
(
void
)
{
delete
_mockUAS
;
}
// Called before every test case
...
...
@@ -53,7 +61,7 @@ void QGCUASFileManagerUnitTest::init(void)
Q_ASSERT
(
_multiSpy
==
NULL
);
_fileManager
=
new
QGCUASFileManager
(
NULL
,
&
_mockUAS
,
_systemIdQGC
);
_fileManager
=
new
QGCUASFileManager
(
NULL
,
_mockUAS
,
_systemIdQGC
);
Q_CHECK_PTR
(
_fileManager
);
// Reset any internal state back to normal
...
...
src/qgcunittest/QGCUASFileManagerTest.h
View file @
ddde7cce
...
...
@@ -48,6 +48,7 @@ public:
private
slots
:
// Test case initialization
void
initTestCase
(
void
);
void
cleanupTestCase
(
void
);
void
init
(
void
);
void
cleanup
(
void
);
...
...
@@ -84,7 +85,7 @@ private:
static
const
uint8_t
_systemIdQGC
=
255
;
static
const
uint8_t
_systemIdServer
=
128
;
MockUAS
_mockUAS
;
MockUAS
*
_mockUAS
;
MockMavlinkFileServer
_mockFileServer
;
QGCUASFileManager
*
_fileManager
;
...
...
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