Index: tests/OFWindowsRegistryKeyTests.m ================================================================== --- tests/OFWindowsRegistryKeyTests.m +++ tests/OFWindowsRegistryKeyTests.m @@ -40,17 +40,20 @@ [OFWindowsRegistryKey localMachineKey]) TEST(@"+[OFWindowsRegistryKey usersKey]", [OFWindowsRegistryKey usersKey]) - TEST(@"-[openSubkeyAtPath:securityAndAccessRights:]", + TEST(@"-[openSubkeyAtPath:securityAndAccessRights:] #1", (softwareKey = [[OFWindowsRegistryKey currentUserKey] openSubkeyAtPath: @"Software" - securityAndAccessRights: KEY_ALL_ACCESS]) && + securityAndAccessRights: KEY_ALL_ACCESS])) + + EXPECT_EXCEPTION(@"-[openSubkeyAtPath:securityAndAccessRights:] #2", + OFOpenWindowsRegistryKeyFailedException, [[OFWindowsRegistryKey currentUserKey] openSubkeyAtPath: @"nonexistent" - securityAndAccessRights: KEY_ALL_ACCESS] == nil) + securityAndAccessRights: KEY_ALL_ACCESS]) TEST(@"-[createSubkeyAtPath:securityAndAccessRights:]", (objFWKey = [softwareKey createSubkeyAtPath: @"ObjFW" securityAndAccessRights: KEY_ALL_ACCESS]))