mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cleanup: move tests into their corresponding namespace
This commit is contained in:
parent
e0ef574c40
commit
26cdab02a8
10 changed files with 30 additions and 12 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include "BLI_strict_flags.h"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(array, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -159,3 +159,5 @@ TEST(array, NoInitializationSizeConstructor)
|
|||
array.~Array();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "BLI_index_mask.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(index_mask, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -37,3 +37,5 @@ TEST(index_mask, RangeConstructor)
|
|||
EXPECT_EQ(indices[1], 4);
|
||||
EXPECT_EQ(indices[2], 5);
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "BLI_vector.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(index_range, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -137,3 +137,5 @@ TEST(index_range, AsSpan)
|
|||
EXPECT_EQ(span[2], 6u);
|
||||
EXPECT_EQ(span[3], 7u);
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "BLI_strict_flags.h"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
static bool is_aligned(void *ptr, uint alignment)
|
||||
{
|
||||
|
|
@ -112,3 +112,5 @@ TEST(linear_allocator, ConstructArrayCopy)
|
|||
EXPECT_EQ(span1[1], 2);
|
||||
EXPECT_EQ(span2[2], 3);
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "BLI_vector.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(map, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -584,3 +584,5 @@ TEST(map, Benchmark)
|
|||
*/
|
||||
|
||||
#endif /* Benchmark */
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "BLI_vector.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(span, FromSmallVector)
|
||||
{
|
||||
|
|
@ -282,3 +282,5 @@ TEST(span, CastLargerSize)
|
|||
EXPECT_EQ(a_span.size(), 4u);
|
||||
EXPECT_EQ(new_a_span.size(), 2u);
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "BLI_vector.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(stack, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -182,3 +182,5 @@ TEST(stack, OveralignedValues)
|
|||
EXPECT_EQ((uintptr_t)&stack.peek() % 512, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
#include "BLI_vector.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using blender::StringRef;
|
||||
using blender::StringRefNull;
|
||||
using blender::Vector;
|
||||
namespace blender {
|
||||
|
||||
TEST(string_ref_null, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -273,3 +271,5 @@ TEST(string_ref, Copy)
|
|||
EXPECT_EQ(dst[6], 0xFF);
|
||||
EXPECT_EQ(ref, dst);
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "BLI_vector_set.hh"
|
||||
#include "testing/testing.h"
|
||||
|
||||
using blender::VectorSet;
|
||||
namespace blender {
|
||||
|
||||
TEST(vector_set, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -158,3 +158,5 @@ TEST(vector_set, Remove)
|
|||
EXPECT_FALSE(set.remove(5));
|
||||
EXPECT_FALSE(set.contains(5));
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "testing/testing.h"
|
||||
#include <forward_list>
|
||||
|
||||
using namespace blender;
|
||||
namespace blender {
|
||||
|
||||
TEST(vector, DefaultConstructor)
|
||||
{
|
||||
|
|
@ -636,3 +636,5 @@ TEST(vector, OveralignedValues)
|
|||
EXPECT_EQ((uintptr_t)&vec.last() % 512, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace blender
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue