Skip to content

Commit

Permalink
iox-eclipse-iceoryx#381 Add check for value to some expected test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
  • Loading branch information
mossmaurice committed Feb 11, 2021
1 parent 0351055 commit 2471480
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iceoryx_utils/test/moduletests/test_cxx_expected.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ TEST_F(expected_test, CreateValueAndMove)
auto movedValue = std::move(sut);
EXPECT_FALSE(sut.is_initialized());
EXPECT_TRUE(movedValue.is_initialized());
EXPECT_THAT(movedValue.value(), Eq(73));
}

TEST_F(expected_test, BoolOperatorError)
Expand Down Expand Up @@ -185,10 +186,11 @@ TEST_F(expected_test, VoidCreateError)

TEST_F(expected_test, VoidCreateErrorAndMove)
{
auto sut = expected<float>::create_error(42);
auto sut = expected<float>::create_error(42.0f);
auto movedValue = std::move(sut);
EXPECT_FALSE(sut.is_initialized());
EXPECT_TRUE(movedValue.is_initialized());
EXPECT_THAT(movedValue.get_error(), Eq(42.0f));
}

TEST_F(expected_test, VoidCreateFromSuccessType)
Expand Down

0 comments on commit 2471480

Please sign in to comment.