Refactor OCL api tests

use testedClDevice instead of devices[testedRootDeviceIndex]
pass only tested device to build program
add member ApiFixture::pDevice

Related-To: NEO-4632
Change-Id: I7d8d1bd6c3336970a1ad0f0e48c254eb6f419200
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-04-24 12:58:39 +02:00
committed by sys_ocldev
parent 7ed45adb27
commit fe3d0a567f
38 changed files with 216 additions and 217 deletions

View File

@ -49,8 +49,8 @@ TEST_F(clLinkProgramTests, GivenValidParamsWhenLinkingProgramThenSuccessIsReturn
retVal = clCompileProgram(
pProgram,
num_devices,
devices,
1,
&testedClDevice,
nullptr,
0,
nullptr,
@ -64,8 +64,8 @@ TEST_F(clLinkProgramTests, GivenValidParamsWhenLinkingProgramThenSuccessIsReturn
cl_program oprog;
oprog = clLinkProgram(
pContext,
num_devices,
devices,
1,
&testedClDevice,
nullptr,
1,
&program,
@ -109,8 +109,8 @@ TEST_F(clLinkProgramTests, GivenCreateLibraryOptionWhenLinkingProgramThenSuccess
retVal = clCompileProgram(
pProgram,
num_devices,
devices,
1,
&testedClDevice,
nullptr,
0,
nullptr,
@ -124,8 +124,8 @@ TEST_F(clLinkProgramTests, GivenCreateLibraryOptionWhenLinkingProgramThenSuccess
cl_program oprog;
oprog = clLinkProgram(
pContext,
num_devices,
devices,
1,
&testedClDevice,
CompilerOptions::createLibrary,
1,
&program,
@ -147,8 +147,8 @@ TEST_F(clLinkProgramTests, GivenNullContextWhenLinkingProgramThenClInvalidContex
cl_program oprog;
oprog = clLinkProgram(
nullptr,
num_devices,
devices,
1,
&testedClDevice,
nullptr,
1,
&program,