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