1 #include <gtest/gtest.h>
2 #include <marnav/nmea/route.hpp>
6 using namespace marnav
;
8 class Test_nmea_route
: public ::testing::Test
12 TEST_F(Test_nmea_route
, default_construction
)
16 EXPECT_EQ(0u, wp
.size());
17 EXPECT_TRUE(wp
.empty());
18 EXPECT_STREQ("", wp
.c_str());
21 TEST_F(Test_nmea_route
, normal_construction
)
23 nmea::route wp
{"abc"};
25 EXPECT_STREQ("abc", wp
.get().c_str());
28 TEST_F(Test_nmea_route
, construction_too_large_string
)
30 EXPECT_ANY_THROW(nmea::route
{"123456789"});
33 TEST_F(Test_nmea_route
, size
)
35 nmea::route wp
{"ABC"};
37 EXPECT_EQ(3u, wp
.size());
40 TEST_F(Test_nmea_route
, c_str
)
42 nmea::route wp
{"ABC"};
44 EXPECT_STREQ("ABC", wp
.c_str());