diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-10-20 15:45:54 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-10-20 15:46:48 +0300 |
commit | 711b55b5277021e395171362c7428cbb34f9caba (patch) | |
tree | ed0fa5b60b595e0386dd17c8797ba4b6a1ebe53a | |
parent | b3d469e78df47cabdda64c3e93bd47d25a971409 (diff) |
Fix libmv test on windows
There is no point in testing std::vector capacity as it can differ
between std implementations.
-rw-r--r-- | intern/libmv/libmv/base/vector_test.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/intern/libmv/libmv/base/vector_test.cc b/intern/libmv/libmv/base/vector_test.cc index 44b9a152148..f171e3a18b5 100644 --- a/intern/libmv/libmv/base/vector_test.cc +++ b/intern/libmv/libmv/base/vector_test.cc @@ -37,11 +37,9 @@ TEST(VectorAlignmentTest, PushBack) { vector<Vec2> vs; vs.push_back(x1); EXPECT_EQ(1, vs.size()); - EXPECT_EQ(1, vs.capacity()); vs.push_back(x2); EXPECT_EQ(2, vs.size()); - EXPECT_EQ(2, vs.capacity()); // The following is necessary because of some bug in gtest; the expected // parameter can't be a fixed size vectorizable type with alignment @@ -55,7 +53,6 @@ TEST(VectorAlignmentTest, PushBack) { vs.push_back(x2); vs.push_back(x2); EXPECT_EQ(5, vs.size()); - EXPECT_EQ(8, vs.capacity()); } // Count the number of destruct calls to test that the destructor gets called. @@ -80,7 +77,6 @@ TEST_F(VectorTest, EmptyVectorDoesNotConstruct) { { vector<Foo> v; EXPECT_EQ(0, v.size()); - EXPECT_EQ(0, v.capacity()); } EXPECT_EQ(0, foo_construct_calls); EXPECT_EQ(0, foo_destruct_calls); @@ -98,13 +94,11 @@ TEST_F(VectorTest, DestructorGetsCalled) { TEST_F(VectorTest, ReserveDoesNotCallConstructorsOrDestructors) { vector<Foo> v; EXPECT_EQ(0, v.size()); - EXPECT_EQ(0, v.capacity()); EXPECT_EQ(0, foo_construct_calls); EXPECT_EQ(0, foo_destruct_calls); v.reserve(5); EXPECT_EQ(0, v.size()); - EXPECT_EQ(5, v.capacity()); EXPECT_EQ(0, foo_construct_calls); EXPECT_EQ(0, foo_destruct_calls); } @@ -126,7 +120,6 @@ TEST_F(VectorTest, ResizeConstructsAndDestructsAsExpected) { // Delete the last one. v.resize(2); EXPECT_EQ(2, v.size()); - EXPECT_EQ(3, v.capacity()); EXPECT_EQ(3, foo_construct_calls); // Delete the remaining two. @@ -158,7 +151,6 @@ TEST_F(VectorTest, CopyConstructor) { vector<int> b(a); EXPECT_EQ(a.size(), b.size()); - //EXPECT_EQ(a.capacity(), b.capacity()); for (int i = 0; i < a.size(); ++i) { EXPECT_EQ(a[i], b[i]); } @@ -173,7 +165,6 @@ TEST_F(VectorTest, OperatorEquals) { b = a; EXPECT_EQ(a.size(), b.size()); - //EXPECT_EQ(a.capacity(), b.capacity()); for (int i = 0; i < a.size(); ++i) { EXPECT_EQ(a[i], b[i]); } |