mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
27 lines
614 B
C++
27 lines
614 B
C++
|
// Tests for the GSOF parser.
|
||
|
// * ./waf tests
|
||
|
// * ./build/sitl/tests/test_gsof
|
||
|
|
||
|
|
||
|
#include <AP_gtest.h>
|
||
|
|
||
|
#include <AP_GSOF/AP_GSOF.h>
|
||
|
|
||
|
const AP_HAL::HAL &hal = AP_HAL::get_HAL();
|
||
|
|
||
|
|
||
|
TEST(AP_GSOF, incomplete_packet)
|
||
|
{
|
||
|
AP_GSOF gsof;
|
||
|
EXPECT_FALSE(gsof.parse(0));
|
||
|
}
|
||
|
|
||
|
TEST(AP_GSOF, packet1)
|
||
|
{
|
||
|
// 02084072580000010a1e02e0680909009400000218000000000000000000000000000000000000000000000000080d000000000000000000000000000910000000000000000000000000000000000c260000000000000000000000000000000000000000000000000000000000000000000000000000a503
|
||
|
AP_GSOF gsof;
|
||
|
EXPECT_FALSE(gsof.parse(0));
|
||
|
}
|
||
|
|
||
|
AP_GTEST_MAIN()
|