diff options
Diffstat (limited to 'tests/gtests/blenlib/BLI_optional_test.cc')
-rw-r--r-- | tests/gtests/blenlib/BLI_optional_test.cc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/gtests/blenlib/BLI_optional_test.cc b/tests/gtests/blenlib/BLI_optional_test.cc index e0dec5681fe..8d8be9a3a31 100644 --- a/tests/gtests/blenlib/BLI_optional_test.cc +++ b/tests/gtests/blenlib/BLI_optional_test.cc @@ -1,4 +1,5 @@ #include "BLI_optional.hh" +#include "BLI_strict_flags.h" #include "testing/testing.h" #include <string> @@ -36,20 +37,6 @@ TEST(optional, Reset) EXPECT_FALSE(a.has_value()); } -TEST(optional, FromNullPointer) -{ - Optional<int> a = Optional<int>::FromPointer(nullptr); - EXPECT_FALSE(a.has_value()); -} - -TEST(optional, FromNonNullPointer) -{ - int value = 42; - Optional<int> a = Optional<int>::FromPointer(&value); - EXPECT_TRUE(a.has_value()); - EXPECT_EQ(a.value(), 42); -} - TEST(optional, Extract) { Optional<int> a(32); |