mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: Append device id to ambigous device names
Related-To: NEO-7537 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e8b0024b5c
commit
91a9b925f7
@@ -55,6 +55,25 @@ TEST(Device, givenNoDebuggerWhenGettingDebuggerThenNullptrIsReturned) {
|
||||
EXPECT_EQ(nullptr, device->getSourceLevelDebugger());
|
||||
}
|
||||
|
||||
TEST(Device, givenDeviceWithBrandingStringNameWhenGettingDeviceNameThenBrandingStringIsReturned) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
hwInfo.capabilityTable.deviceName = "Custom Device";
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
EXPECT_STREQ("Custom Device", device->getDeviceName().c_str());
|
||||
}
|
||||
|
||||
TEST(Device, givenDeviceWithoutBrandingStringNameWhenGettingDeviceNameThenGenericNameWithHexadecimalDeviceIdIsReturned) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
hwInfo.capabilityTable.deviceName = "";
|
||||
hwInfo.platform.usDeviceID = 0x1AB;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
EXPECT_STREQ("Intel(R) Graphics [0x01ab]", device->getDeviceName().c_str());
|
||||
}
|
||||
|
||||
using DeviceTest = Test<DeviceFixture>;
|
||||
|
||||
TEST_F(DeviceTest, whenInitializeRayTracingIsCalledAndRtBackedBufferIsNullptrThenMemoryBackedBufferIsCreated) {
|
||||
|
||||
Reference in New Issue
Block a user