Add trailing space to compiler extensions string

Change-Id: Ib9e2f33916dd1475defc60bfc297ef36fc87eb03
This commit is contained in:
Zdanowicz, Zbigniew
2018-06-26 15:56:50 +02:00
committed by sys_ocldev
parent f5baa783de
commit d447c8c951
2 changed files with 7 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ TEST_F(PlatformFailingTest, givenPlatformInitializationWhenIncorrectHwInfoThenIn
delete platform;
}
TEST_F(PlatformTest, getAsCompilerEnabledExtensionsString) {
TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatchingSubstringsAndMandatoryTrailingSpace) {
const HardwareInfo *hwInfo;
hwInfo = platformDevices[0];
std::string extensionsList = getExtensionsList(*hwInfo);
@@ -165,9 +165,11 @@ TEST_F(PlatformTest, getAsCompilerEnabledExtensionsString) {
if (hwInfo->capabilityTable.ftrSupportsFP64) {
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_fp64")));
}
EXPECT_THAT(compilerExtensions, ::testing::EndsWith(std::string(" ")));
}
TEST_F(PlatformTest, getAsCompilerEnabledExtensionsStringTestNotFP64) {
TEST_F(PlatformTest, givenNotSupportingCl21WhenPlatformNotSupportFp64ThenNotFillMatchingSubstringAndFillMandatoryTrailingSpace) {
HardwareInfo TesthwInfo = *platformDevices[0];
TesthwInfo.capabilityTable.ftrSupportsFP64 = false;
TesthwInfo.capabilityTable.clVersionSupport = 10;
@@ -180,6 +182,8 @@ TEST_F(PlatformTest, getAsCompilerEnabledExtensionsStringTestNotFP64) {
EXPECT_THAT(compilerExtensions, ::testing::Not(::testing::HasSubstr(std::string("cl_khr_fp64"))));
EXPECT_THAT(compilerExtensions, ::testing::Not(::testing::HasSubstr(std::string("cl_khr_subgroups"))));
EXPECT_THAT(compilerExtensions, ::testing::EndsWith(std::string(" ")));
}
TEST_F(PlatformTest, testRemoveLastSpace) {