From c81154c470cec39f092c6ff094cd45d3f27410f3 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 27 Dec 2025 12:29:45 +0100 Subject: test: Use correct macros for option unit tests. test: allocator_op is now doing the full range check. Signed-off-by: Amlal El Mahrouss --- test/allocator_op.test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/allocator_op.test.cpp') diff --git a/test/allocator_op.test.cpp b/test/allocator_op.test.cpp index 33546de..5979c7d 100644 --- a/test/allocator_op.test.cpp +++ b/test/allocator_op.test.cpp @@ -15,6 +15,9 @@ BOOST_AUTO_TEST_CASE(allocator_should_succeed) auto ptr = ocl::allocator{}.construct_array<10>(); int* arr = ptr.get(); BOOST_TEST(arr != nullptr); - *arr = 10; - BOOST_TEST(*arr == 10); + for (auto i{0ul}; i < 10; ++i) + { + *(arr + i) = 10; + BOOST_TEST(*(arr + i) == 10); + } } -- cgit v1.2.3