Skip to content

Commit

Permalink
iox-eclipse-iceoryx#391 simplified no death tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Killat <matthias.killat@apex.ai>
  • Loading branch information
MatthiasKillat committed Mar 1, 2021
1 parent c3f37cc commit 52fb22d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
15 changes: 8 additions & 7 deletions iceoryx_binding_c/test/moduletests/test_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,12 @@ TEST_F(iox_pub_test, publisherOptionsAreInitializedCorrectly)

TEST_F(iox_pub_test, publisherOptionInitializationWithNullptrDoesNotCrash)
{
EXPECT_EXIT(
{
iox_pub_options_init(nullptr);
exit(0);
},
::testing::ExitedWithCode(0),
".*");
iox_pub_options_init(nullptr);
// EXPECT_EXIT(
// {
// iox_pub_options_init(nullptr);
// exit(0);
// },
// ::testing::ExitedWithCode(0),
// ".*");
}
17 changes: 9 additions & 8 deletions iceoryx_binding_c/test/moduletests/test_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,14 @@ TEST_F(iox_sub_test, subscriberOptionsAreInitializedCorrectly)
EXPECT_EQ(sut.nodeName, nullptr);
}

TEST_F(iox_sub_test, subscriberOptionInitializationWithNullptrDoesNotCrash)
TEST(iox_sub_test, subscriberOptionInitializationWithNullptrDoesNotCrash)
{
EXPECT_EXIT(
{
iox_sub_options_init(nullptr);
exit(0);
},
::testing::ExitedWithCode(0),
".*");
iox_sub_options_init(nullptr);
// EXPECT_EXIT(
// {
// iox_sub_options_init(nullptr);
// exit(0);
// },
// ::testing::ExitedWithCode(0),
// ".*");
}

0 comments on commit 52fb22d

Please sign in to comment.