fix: remove device id value from device name string

Resolves: NEO-7537
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-01-12 12:58:20 +01:00
committed by Compute-Runtime-Automation
parent 0a75560d7d
commit bc5bce6847
2 changed files with 3 additions and 11 deletions

View File

@@ -16,16 +16,13 @@ using namespace NEO;
using DeviceNameTest = ::testing::Test;
TEST_F(DeviceNameTest, WhenCallingGetClDeviceNameThenReturnDeviceNameWithDeviceIdAppendedAtTheEnd) {
TEST_F(DeviceNameTest, WhenCallingGetClDeviceNameThenReturnDeviceNameWithoutDeviceIdAppendedAtTheEnd) {
auto clDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
std::string deviceName = "Intel(R) Graphics";
EXPECT_STREQ(deviceName.c_str(), clDevice->device.getDeviceName(*defaultHwInfo.get()).c_str());
std::stringstream clDeviceName;
clDeviceName << deviceName;
clDeviceName << " [0x" << std::hex << std::setw(4) << std::setfill('0') << defaultHwInfo->platform.usDeviceID << "]";
EXPECT_STREQ(clDeviceName.str().c_str(), clDevice->getClDeviceName(*defaultHwInfo.get()).c_str());
EXPECT_STREQ(deviceName.c_str(), clDevice->getClDeviceName(*defaultHwInfo.get()).c_str());
}
TEST_F(DeviceNameTest, GivenDeviceWithNameWhenCallingGetClDeviceNameThenReturnCustomDeviceName) {