Skip to content

Commit 4b633ef

Browse files
test(memory_tests): guard small_vec tests with feature flags
Move cstddef include inside conditional compilation block and wrap test execution with WHEEL_EXPERIMENT and WHEEL_SMALL_VEC defines to ensure tests only run when the feature is properly enabled.
1 parent 036ae3e commit 4b633ef

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/memory_tests/memory_small_vec_test.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#include <__internal/__assert.hxx>
2-
#include <cstddef>
32
#include <wheel_memory/vec.hxx>
43
#include <wheel_memory/allocator.hxx>
54
#include <wheel_memory/config.hxx>
65

76
USE_WHEEL_SMALL_VEC
87

98
#if HAS_USE_SMALL_VEC
9+
#include <cstddef>
1010
using wheel_memory::Arena;
1111
#endif
1212

@@ -58,6 +58,8 @@ USE_WHEEL_SMALL_VEC
5858
#endif
5959

6060
TEST_MAIN
61-
RUN(test_basic_operations)
62-
RUN(test_stack_to_heap_transition)
61+
#if defined (WHEEL_EXPERIMENT) && defined (WHEEL_SMALL_VEC)
62+
RUN(test_basic_operations)
63+
RUN(test_stack_to_heap_transition)
64+
#endif
6365
END_MAIN

0 commit comments

Comments
 (0)