Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1823 Adjust emplace unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <[email protected]>
  • Loading branch information
elfenpiff committed Dec 13, 2022
1 parent 6af2e3a commit bbb33bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iceoryx_hoofs/test/moduletests/test_cxx_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ TEST_F(vector_test, EmplacingElementInTheMiddleCallsDTor)
EXPECT_THAT(customCTor, Eq(EXPECTED_NUMBER_OF_CTOR_CALLS - 1U));
EXPECT_TRUE(sut.emplace(EMPLACE_POSITION, 42U));
EXPECT_THAT(customCTor, Eq(EXPECTED_NUMBER_OF_CTOR_CALLS));
EXPECT_THAT(moveAssignment, Eq(EMPLACE_POSITION - 1U));
EXPECT_THAT(moveCTor, Eq(1U));
EXPECT_THAT(moveAssignment, Eq(CAPACITY_OF_VECTOR - 1U - EMPLACE_POSITION - 1U));
EXPECT_THAT(dTor, Eq(1U));
}
// Last element in the vector is moved and not constructed, hence #moveCTor + #customCTor = #dTor
Expand Down

0 comments on commit bbb33bd

Please sign in to comment.