Skip to content

Commit

Permalink
tests: fixed test-specific UB
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Apr 21, 2023
1 parent 80fc457 commit 56b0b45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/t-make_ptr-11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ TEST_CASE("[make-ptr:make_aliased]")
// null
{
std::shared_ptr<vec> ptr;
auto alias = itlib::make_aliased(ptr, &ptr->y);
int val = 5;
auto alias = itlib::make_aliased(ptr, &val);
CHECK_FALSE(alias);
CHECK(alias.use_count() == 0);
}
Expand Down

0 comments on commit 56b0b45

Please sign in to comment.