Build: update docker build scripts
[marnav.git] / test / ais / Test_ais_message.cpp
blobde09d8ed00e87942b779954b2270d73ac1f6e6ea
1 #include <gtest/gtest.h>
2 #include <marnav/ais/message.hpp>
3 #include <marnav/ais/message_01.hpp>
4 #include <marnav/ais/message_05.hpp>
6 namespace
9 using namespace marnav;
11 class Test_ais_message : public ::testing::Test
15 TEST_F(Test_ais_message, message_cast_nullptr)
17 std::unique_ptr<ais::message> m;
18 auto rc = ais::message_cast<ais::message_01>(m);
19 EXPECT_EQ(nullptr, rc);
22 TEST_F(Test_ais_message, message_cast_wrong_id)
24 std::unique_ptr<ais::message> m(new ais::message_01);
25 EXPECT_ANY_THROW(ais::message_cast<ais::message_05>(m));