1 #include <marnav/nmea/zdl.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_zdl
: public ::testing::Test
15 TEST_F(Test_nmea_zdl
, contruction
)
17 EXPECT_NO_THROW(nmea::zdl zdl
);
20 TEST_F(Test_nmea_zdl
, properties
)
22 nmea_sentence_traits
<nmea::zdl
>();
25 TEST_F(Test_nmea_zdl
, parse
)
27 auto s
= nmea::make_sentence("$GPZDL,383401,12.3,R*28");
28 ASSERT_NE(nullptr, s
);
30 auto zdl
= nmea::sentence_cast
<nmea::zdl
>(s
);
31 ASSERT_NE(nullptr, zdl
);
34 TEST_F(Test_nmea_zdl
, parse_invalid_number_of_arguments
)
37 nmea::detail::factory::sentence_parse
<nmea::zdl
>(nmea::talker::none
, {2, "@"}));
39 nmea::detail::factory::sentence_parse
<nmea::zdl
>(nmea::talker::none
, {4, "@"}));
42 TEST_F(Test_nmea_zdl
, empty_to_string
)
46 EXPECT_STREQ("$GPZDL,000000,0.0,R*15", nmea::to_string(zdl
).c_str());