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