mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Pass full registry path to DriverInfoWindows constructor
Related-To: NEO-4457 Change-Id: I6b417b3a571349947bbbfc94b10c478b8793c2de Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
e55d4bf234
commit
2dbee6d7c1
@ -99,7 +99,7 @@ class RegistryReaderMock : public SettingsReader {
|
||||
};
|
||||
|
||||
TEST(DriverInfo, GivenDriverInfoWhenThenReturnNonNullptr) {
|
||||
DriverInfoWindows driverInfo;
|
||||
DriverInfoWindows driverInfo("");
|
||||
RegistryReaderMock *registryReaderMock = new RegistryReaderMock();
|
||||
|
||||
driverInfo.setRegistryReader(registryReaderMock);
|
||||
@ -119,6 +119,15 @@ TEST(DriverInfo, GivenDriverInfoWhenThenReturnNonNullptr) {
|
||||
EXPECT_TRUE(registryReaderMock->properVersionKey);
|
||||
};
|
||||
|
||||
TEST(DriverInfo, givenFullPathToRegistryWhenCreatingDriverInfoWindowsThenTheRegistryPathIsTrimmed) {
|
||||
std::string registryPath = "Path\\In\\Registry";
|
||||
std::string fullRegistryPath = "\\REGISTRY\\MACHINE\\" + registryPath;
|
||||
std::string expectedTrimmedRegistryPath = registryPath;
|
||||
DriverInfoWindows driverInfo(std::move(fullRegistryPath));
|
||||
|
||||
EXPECT_STREQ(expectedTrimmedRegistryPath.c_str(), driverInfo.getRegistryPath().c_str());
|
||||
};
|
||||
|
||||
TEST(DriverInfo, givenInitializedOsInterfaceWhenCreateDriverInfoThenReturnDriverInfoWindowsNotNullptr) {
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
@ -144,6 +153,7 @@ TEST(DriverInfo, givenNotInitializedOsInterfaceWhenCreateDriverInfoThenReturnDri
|
||||
class MockDriverInfoWindows : public DriverInfoWindows {
|
||||
|
||||
public:
|
||||
MockDriverInfoWindows() : DriverInfoWindows("") {}
|
||||
const char *getRegistryReaderRegKey() {
|
||||
return reader->getRegKey();
|
||||
}
|
||||
|
Reference in New Issue
Block a user