These tests do not use the MAKE_MOVE_TESTS helper because they need to check whether the device is reference-countable, and to check that the reference-countable flag is correctly moved.
| 1193 | // check whether the device is reference-countable, and to check that |
| 1194 | // the reference-countable flag is correctly moved. |
| 1195 | void testMoveAssignDeviceNonNull(void) |
| 1196 | { |
| 1197 | #ifdef TEST_RVALUE_REFERENCES |
| 1198 | clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform); |
| 1199 | clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2); |
| 1200 | |
| 1201 | // Release called when trg overwritten |
| 1202 | clReleaseDevice_ExpectAndReturn(make_device_id(1), CL_SUCCESS); |
| 1203 | |
| 1204 | cl::Device src(make_device_id(0)); |
| 1205 | cl::Device trg(make_device_id(1)); |
| 1206 | trg = std::move(src); |
| 1207 | TEST_ASSERT_EQUAL_PTR(make_device_id(0), trg()); |
| 1208 | TEST_ASSERT_NULL(src()); |
| 1209 | |
| 1210 | // Prevent destructor from interfering with the test |
| 1211 | trg() = nullptr; |
| 1212 | #endif |
| 1213 | } |
| 1214 | |
| 1215 | void testMoveAssignDeviceNull(void) |
| 1216 | { |
nothing calls this directly
no test coverage detected