ardupilot/libraries/AP_GSOF/tests/test_gsof.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
614 B
C++
Raw Normal View History

// 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()