Skip to content

Commit

Permalink
test 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner Henze committed Dec 23, 2024
1 parent e66bbb6 commit 893ca34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/pointers_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ TEST(pointers_test, swap)
EXPECT_TRUE(*a == 1);
EXPECT_TRUE(*b == 0);

// Make sure our custom ptr can be used with not_null, and is used to not get unused warnings.
NotMoveAssignableCustomPtr custom_ptr{};
gsl::not_null<NotMoveAssignableCustomPtr> c{custom_ptr};
// Make sure our custom ptr can be used with not_null. The shared_pr is to prevent "unused"
// compiler warnings.
const auto shared_custom_ptr{std::make_shared<NotMoveAssignableCustomPtr>()};
gsl::not_null<NotMoveAssignableCustomPtr> c{*shared_custom_ptr};
EXPECT_TRUE(c.get() != nullptr);
}

Expand Down

0 comments on commit 893ca34

Please sign in to comment.