1 #include <marnav/nmea/angle.hpp>
2 #include <gtest/gtest.h>
7 class Test_nmea_angle
: public ::testing::Test
11 TEST_F(Test_nmea_angle
, parse_empty_string
)
13 const auto expected
= marnav::geo::angle
{0.0};
15 auto result
= marnav::nmea::parse_latitude("");
17 EXPECT_DOUBLE_EQ(expected
, result
);
20 TEST_F(Test_nmea_angle
, parse_invalid_string
)
22 EXPECT_ANY_THROW(marnav::nmea::parse_latitude("001.abcdefgh"));
25 TEST_F(Test_nmea_angle
, parse_invalid_minutes
)
27 EXPECT_ANY_THROW(marnav::nmea::parse_latitude("00161.000"));