summaryrefslogtreecommitdiffhomepage
path: root/test/allocator_op.test.cpp
blob: c079bd9dcf1175ec3ffe13b556e01c4cfe7c3d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// File: allocator.test.cpp
// Purpose; Allocator test for OCL.
/// @brief This unit test checks if the test succeeds.
/// @author Amlal El Mahrouss

#include <ocl/allocator_op.hpp>

#define BOOST_TEST_MODULE allocator_op
#include <boost/test/included/unit_test.hpp>

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);
}