Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ddde7cce
Commit
ddde7cce
authored
Dec 04, 2014
by
Don Gagne
Browse files
Must new MockUAS otherwise qt resource system is not ready
parent
ed807d4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment