1 #include <marnav/nmea/hfb.hpp>
2 #include "type_traits_helper.hpp"
3 #include <marnav/nmea/nmea.hpp>
4 #include <gtest/gtest.h>
9 using namespace marnav
;
11 class Test_nmea_hfb
: public ::testing::Test
15 TEST_F(Test_nmea_hfb
, contruction
)
17 EXPECT_NO_THROW(nmea::hfb hfb
);
20 TEST_F(Test_nmea_hfb
, properties
)
22 nmea_sentence_traits
<nmea::hfb
>();
25 TEST_F(Test_nmea_hfb
, parse
)
27 auto s
= nmea::make_sentence("$GPHFB,1.0,M,2.0,M*58");
28 ASSERT_NE(nullptr, s
);
30 auto hfb
= nmea::sentence_cast
<nmea::hfb
>(s
);
31 ASSERT_NE(nullptr, hfb
);
34 TEST_F(Test_nmea_hfb
, parse_invalid_number_of_arguments
)
37 nmea::detail::factory::sentence_parse
<nmea::hfb
>(nmea::talker::none
, {3, "@"}));
39 nmea::detail::factory::sentence_parse
<nmea::hfb
>(nmea::talker::none
, {5, "@"}));
42 TEST_F(Test_nmea_hfb
, empty_to_string
)
46 EXPECT_STREQ("$GPHFB,0,M,0,M*5B", nmea::to_string(hfb
).c_str());