MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CLHPP / testMoveConstructDeviceNonNull

Function testMoveConstructDeviceNonNull

tests/test_openclhpp.cpp:1232–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1230}
1231
1232void testMoveConstructDeviceNonNull(void)
1233{
1234#ifdef TEST_RVALUE_REFERENCES
1235 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
1236 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2);
1237
1238 cl::Device src(make_device_id(0));
1239 cl::Device trg(std::move(src));
1240 TEST_ASSERT_EQUAL_PTR(make_device_id(0), trg());
1241 TEST_ASSERT_NULL(src());
1242
1243 // Prevent destructor from interfering with the test
1244 trg() = nullptr;
1245#endif
1246}
1247
1248void testMoveConstructDeviceNull(void)
1249{

Callers

nothing calls this directly

Calls 1

make_device_idFunction · 0.85

Tested by

no test coverage detected