summaryrefslogtreecommitdiffhomepage
path: root/test/allocator_op.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/allocator_op.test.cpp')
-rw-r--r--test/allocator_op.test.cpp7
1 files changed, 5 insertions, 2 deletions
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<int>{}.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);
+ }
}