mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Add trailing space to compiler extensions string
Change-Id: Ib9e2f33916dd1475defc60bfc297ef36fc87eb03
This commit is contained in:
committed by
sys_ocldev
parent
f5baa783de
commit
d447c8c951
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user