Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-06-09 11:10:56 +0300
committerJacques Lucke <jacques@blender.org>2020-06-09 11:15:43 +0300
commitd8678e02ecec9375bec1dcf1388c6fc8b4ce3ad2 (patch)
tree6e7d2a7452091877f73d413d830e6cb12e86745f /tests/gtests/blenlib/BLI_optional_test.cc
parent50258d55e7c1360274d40e303386cf70b16c8b2f (diff)
BLI: generally improve C++ data structures
The main focus here was to improve the docs significantly. Furthermore, I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually) faster, simpler and more customizable. I also rewrote `Stack` to make it more efficient by avoiding unnecessary copies. Thanks to everyone who helped with constructive feedback. Approved by brecht and sybren. Differential Revision: https://developer.blender.org/D7931
Diffstat (limited to 'tests/gtests/blenlib/BLI_optional_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_optional_test.cc15
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);