Cleanup: move tests into their corresponding namespace

This commit is contained in:
2020-06-30 16:46:46 +02:00
parent e0ef574c40
commit 26cdab02a8
10 changed files with 30 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
#include "BLI_strict_flags.h" #include "BLI_strict_flags.h"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(array, DefaultConstructor) TEST(array, DefaultConstructor)
{ {
@@ -159,3 +159,5 @@ TEST(array, NoInitializationSizeConstructor)
array.~Array(); array.~Array();
} }
} }
} // namespace blender

View File

@@ -1,7 +1,7 @@
#include "BLI_index_mask.hh" #include "BLI_index_mask.hh"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(index_mask, DefaultConstructor) TEST(index_mask, DefaultConstructor)
{ {
@@ -37,3 +37,5 @@ TEST(index_mask, RangeConstructor)
EXPECT_EQ(indices[1], 4); EXPECT_EQ(indices[1], 4);
EXPECT_EQ(indices[2], 5); EXPECT_EQ(indices[2], 5);
} }
} // namespace blender

View File

@@ -3,7 +3,7 @@
#include "BLI_vector.hh" #include "BLI_vector.hh"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(index_range, DefaultConstructor) TEST(index_range, DefaultConstructor)
{ {
@@ -137,3 +137,5 @@ TEST(index_range, AsSpan)
EXPECT_EQ(span[2], 6u); EXPECT_EQ(span[2], 6u);
EXPECT_EQ(span[3], 7u); EXPECT_EQ(span[3], 7u);
} }
} // namespace blender

View File

@@ -2,7 +2,7 @@
#include "BLI_strict_flags.h" #include "BLI_strict_flags.h"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
static bool is_aligned(void *ptr, uint alignment) static bool is_aligned(void *ptr, uint alignment)
{ {
@@ -112,3 +112,5 @@ TEST(linear_allocator, ConstructArrayCopy)
EXPECT_EQ(span1[1], 2); EXPECT_EQ(span1[1], 2);
EXPECT_EQ(span2[2], 3); EXPECT_EQ(span2[2], 3);
} }
} // namespace blender

View File

@@ -6,7 +6,7 @@
#include "BLI_vector.hh" #include "BLI_vector.hh"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(map, DefaultConstructor) TEST(map, DefaultConstructor)
{ {
@@ -584,3 +584,5 @@ TEST(map, Benchmark)
*/ */
#endif /* Benchmark */ #endif /* Benchmark */
} // namespace blender

View File

@@ -3,7 +3,7 @@
#include "BLI_vector.hh" #include "BLI_vector.hh"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(span, FromSmallVector) TEST(span, FromSmallVector)
{ {
@@ -282,3 +282,5 @@ TEST(span, CastLargerSize)
EXPECT_EQ(a_span.size(), 4u); EXPECT_EQ(a_span.size(), 4u);
EXPECT_EQ(new_a_span.size(), 2u); EXPECT_EQ(new_a_span.size(), 2u);
} }
} // namespace blender

View File

@@ -3,7 +3,7 @@
#include "BLI_vector.hh" #include "BLI_vector.hh"
#include "testing/testing.h" #include "testing/testing.h"
using namespace blender; namespace blender {
TEST(stack, DefaultConstructor) TEST(stack, DefaultConstructor)
{ {
@@ -182,3 +182,5 @@ TEST(stack, OveralignedValues)
EXPECT_EQ((uintptr_t)&stack.peek() % 512, 0); EXPECT_EQ((uintptr_t)&stack.peek() % 512, 0);
} }
} }
} // namespace blender

View File

@@ -3,9 +3,7 @@
#include "BLI_vector.hh" #include "BLI_vector.hh"
#include "testing/testing.h" #include "testing/testing.h"
using blender::StringRef; namespace blender {
using blender::StringRefNull;
using blender::Vector;
TEST(string_ref_null, DefaultConstructor) TEST(string_ref_null, DefaultConstructor)
{ {
@@ -273,3 +271,5 @@ TEST(string_ref, Copy)
EXPECT_EQ(dst[6], 0xFF); EXPECT_EQ(dst[6], 0xFF);
EXPECT_EQ(ref, dst); EXPECT_EQ(ref, dst);
} }
} // namespace blender

View File

@@ -2,7 +2,7 @@
#include "BLI_vector_set.hh" #include "BLI_vector_set.hh"
#include "testing/testing.h" #include "testing/testing.h"
using blender::VectorSet; namespace blender {
TEST(vector_set, DefaultConstructor) TEST(vector_set, DefaultConstructor)
{ {
@@ -158,3 +158,5 @@ TEST(vector_set, Remove)
EXPECT_FALSE(set.remove(5)); EXPECT_FALSE(set.remove(5));
EXPECT_FALSE(set.contains(5)); EXPECT_FALSE(set.contains(5));
} }
} // namespace blender

View File

@@ -3,7 +3,7 @@
#include "testing/testing.h" #include "testing/testing.h"
#include <forward_list> #include <forward_list>
using namespace blender; namespace blender {
TEST(vector, DefaultConstructor) TEST(vector, DefaultConstructor)
{ {
@@ -636,3 +636,5 @@ TEST(vector, OveralignedValues)
EXPECT_EQ((uintptr_t)&vec.last() % 512, 0); EXPECT_EQ((uintptr_t)&vec.last() % 512, 0);
} }
} }
} // namespace blender