1 #include <marnav/nmea/gst.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_gst
: public ::testing::Test
15 TEST_F(Test_nmea_gst
, contruction
)
17 EXPECT_NO_THROW(nmea::gst gst
);
20 TEST_F(Test_nmea_gst
, properties
)
22 nmea_sentence_traits
<nmea::gst
>();
25 TEST_F(Test_nmea_gst
, parse
)
27 auto s
= nmea::make_sentence("$GPGST,123456.34,1.0,2.1,3.2,4.3,5.4,6.5,7.6*50");
28 ASSERT_NE(nullptr, s
);
30 auto gst
= nmea::sentence_cast
<nmea::gst
>(s
);
31 ASSERT_NE(nullptr, gst
);
34 TEST_F(Test_nmea_gst
, parse_invalid_number_of_arguments
)
37 nmea::detail::factory::sentence_parse
<nmea::gst
>(nmea::talker::none
, {7, "@"}));
39 nmea::detail::factory::sentence_parse
<nmea::gst
>(nmea::talker::none
, {9, "@"}));
42 TEST_F(Test_nmea_gst
, empty_to_string
)
46 EXPECT_STREQ("$GPGST,000000.00,0,0,0,0,0,0,0*49", nmea::to_string(gst
).c_str());