mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 00:10:58 +08:00
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:
committed by
Compute-Runtime-Automation
parent
0a75560d7d
commit
bc5bce6847
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user