[Bf-blender-cvs] [d533afa17b4] functions: all_equal tests

Jacques Lucke noreply at git.blender.org
Mon Feb 18 18:19:22 CET 2019


Commit: d533afa17b4d54da4d93ada7cce9a01c4c46784a
Author: Jacques Lucke
Date:   Mon Feb 18 17:21:23 2019 +0100
Branches: functions
https://developer.blender.org/rBd533afa17b4d54da4d93ada7cce9a01c4c46784a

all_equal tests

===================================================================

M	tests/gtests/blenlib/BLI_small_vector_test.cc

===================================================================

diff --git a/tests/gtests/blenlib/BLI_small_vector_test.cc b/tests/gtests/blenlib/BLI_small_vector_test.cc
index 2311552e080..c8716a4fa6d 100644
--- a/tests/gtests/blenlib/BLI_small_vector_test.cc
+++ b/tests/gtests/blenlib/BLI_small_vector_test.cc
@@ -191,4 +191,20 @@ TEST(small_vector, RemoveReorder)
 	EXPECT_EQ(vec[0], 7);
 	vec.remove_and_reorder(0);
 	EXPECT_TRUE(vec.empty());
+}
+
+TEST(small_vector, AllEqual_False)
+{
+	IntVector a = {1, 2, 3};
+	IntVector b = {1, 2, 4};
+	bool result = IntVector::all_equal(a, b);
+	EXPECT_FALSE(result);
+}
+
+TEST(small_vector, AllEqual_True)
+{
+	IntVector a = {4, 5, 6};
+	IntVector b = {4, 5, 6};
+	bool result = IntVector::all_equal(a, b);
+	EXPECT_TRUE(result);
 }
\ No newline at end of file



More information about the Bf-blender-cvs mailing list