ObjFW  Diff

Differences From Artifact [d53759aab6]:

To Artifact [814a5cca52]:


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- (void)windowsRegistryKeyTests
{
	void *pool = objc_autoreleasePoolPush();
	OFData *data = [OFData dataWithItems: "abcdef"
				       count: 6];
	OFWindowsRegistryKey *softwareKey, *ObjFWKey;
	DWORD type;
	OFString *string;

	TEST(@"+[OFWindowsRegistryKey classesRootKey]",
	    [OFWindowsRegistryKey classesRootKey])

	TEST(@"+[OFWindowsRegistryKey currentConfigKey]",
	    [OFWindowsRegistryKey currentConfigKey])








<







25
26
27
28
29
30
31

32
33
34
35
36
37
38
- (void)windowsRegistryKeyTests
{
	void *pool = objc_autoreleasePoolPush();
	OFData *data = [OFData dataWithItems: "abcdef"
				       count: 6];
	OFWindowsRegistryKey *softwareKey, *ObjFWKey;
	DWORD type;


	TEST(@"+[OFWindowsRegistryKey classesRootKey]",
	    [OFWindowsRegistryKey classesRootKey])

	TEST(@"+[OFWindowsRegistryKey currentConfigKey]",
	    [OFWindowsRegistryKey currentConfigKey])

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

	TEST(@"-[setData:forValue:type:]",
	    R([ObjFWKey setData: data
		       forValue: @"data"
			   type: REG_BINARY]))

	TEST(@"-[dataForValue:subkeyPath:flags:type:]",
	    [[softwareKey dataForValue: @"data"
			    subkeyPath: @"ObjFW"
				 flags: RRF_RT_REG_BINARY
				  type: &type] isEqual: data] &&
	    type == REG_BINARY)

	TEST(@"-[setString:forValue:type:]",
	    R([ObjFWKey setString: @"foobar"
			 forValue: @"string"]) &&
	    R([ObjFWKey setString: @"%PATH%;foo"
			 forValue: @"expand"
			     type: REG_EXPAND_SZ]))

	TEST(@"-[stringForValue:subkeyPath:]",
	    [[softwareKey stringForValue: @"string"
			      subkeyPath: @"ObjFW"] isEqual: @"foobar"] &&
	    [[softwareKey stringForValue: @"expand"
			      subkeyPath: @"ObjFW"
				   flags: RRF_RT_REG_EXPAND_SZ | RRF_NOEXPAND
				    type: &type] isEqual: @"%PATH%;foo"] &&
	    type == REG_EXPAND_SZ &&
	    (string = [ObjFWKey stringForValue: @"expand"
				    subkeyPath: nil]) &&
	    ![string isEqual: @"%PATH%;foo"] &&
	    [string hasSuffix: @";foo"])

	TEST(@"-[deleteValue:]", R([ObjFWKey deleteValue: @"data"]))

	TEST(@"-[deleteSubkeyAtPath:]",
	    R([softwareKey deleteSubkeyAtPath: @"ObjFW"]))

	objc_autoreleasePoolPop(pool);
}
@end







|
<
<
|










|
<
|
<
<
|
|
<
<
<
<









59
60
61
62
63
64
65
66


67
68
69
70
71
72
73
74
75
76
77
78

79


80
81




82
83
84
85
86
87
88
89
90

	TEST(@"-[setData:forValue:type:]",
	    R([ObjFWKey setData: data
		       forValue: @"data"
			   type: REG_BINARY]))

	TEST(@"-[dataForValue:subkeyPath:flags:type:]",
	    [[ObjFWKey dataForValue: @"data"


			       type: &type] isEqual: data] &&
	    type == REG_BINARY)

	TEST(@"-[setString:forValue:type:]",
	    R([ObjFWKey setString: @"foobar"
			 forValue: @"string"]) &&
	    R([ObjFWKey setString: @"%PATH%;foo"
			 forValue: @"expand"
			     type: REG_EXPAND_SZ]))

	TEST(@"-[stringForValue:subkeyPath:]",
	    [[ObjFWKey stringForValue: @"string"] isEqual: @"foobar"] &&

	    [[ObjFWKey stringForValue: @"expand"


				 type: &type] isEqual: @"%PATH%;foo"] &&
	    type == REG_EXPAND_SZ)





	TEST(@"-[deleteValue:]", R([ObjFWKey deleteValue: @"data"]))

	TEST(@"-[deleteSubkeyAtPath:]",
	    R([softwareKey deleteSubkeyAtPath: @"ObjFW"]))

	objc_autoreleasePoolPop(pool);
}
@end