ObjFW  Diff

Differences From Artifact [df50ba0832]:

To Artifact [36680e2682]:


11
12
13
14
15
16
17
18
19
20



21
22
23
24



25
26
27


28
29
30


31
32
33
34
35
36





37
38
39
40
41
42
43
44
45
46









47
48
49


50
51
52


53
54
55
56
57
58
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
11
12
13
14
15
16
17



18
19
20




21
22
23



24
25



26
27
28





29
30
31
32
33










34
35
36
37
38
39
40
41
42



43
44



45
46
47
48
49
50
51
52
53
54
55
56

57


58


59









60
61
62
63
64
65
66







-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
-
-
-
+
+

-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
+
+










-
+
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-







 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "ObjFW.h"

#define TEST(test, ...)					\
	{						\
		[self outputTesting: test		\
#define TEST(test, ...)							\
	{								\
		[self outputTesting: test inModule: module];		\
			   inModule: module];		\
							\
		if (__VA_ARGS__)			\
			[self outputSuccess: test	\
									\
		if (__VA_ARGS__)					\
			[self outputSuccess: test inModule: module];	\
				   inModule: module];	\
		else {					\
			[self outputFailure: test	\
		else {							\
			[self outputFailure: test inModule: module];	\
				   inModule: module];	\
			_fails++;			\
		}					\
			_fails++;					\
		}							\
	}
#define EXPECT_EXCEPTION(test, exception, code)		\
	{						\
		bool caught = false;			\
							\
		[self outputTesting: test		\
#define EXPECT_EXCEPTION(test, exception, code)				\
	{								\
		bool caught = false;					\
									\
		[self outputTesting: test inModule: module];		\
			   inModule: module];		\
							\
		@try {					\
			code;				\
		} @catch (exception *e) {		\
			caught = true;			\
		}					\
							\
		if (caught)				\
			[self outputSuccess: test	\
									\
		@try {							\
			code;						\
		} @catch (exception *e) {				\
			caught = true;					\
		}							\
									\
		if (caught)						\
			[self outputSuccess: test inModule: module];	\
				   inModule: module];	\
		else {					\
			[self outputFailure: test	\
		else {							\
			[self outputFailure: test inModule: module];	\
				   inModule: module];	\
			_fails++;			\
		}					\
			_fails++;					\
		}							\
	}
#define R(...) (__VA_ARGS__, 1)

@class OFString;

@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
{
	int _fails;
}

- (void)outputTesting: (OFString *)test
- (void)outputTesting: (OFString *)test inModule: (OFString *)module;
	     inModule: (OFString *)module;
- (void)outputSuccess: (OFString *)test
- (void)outputSuccess: (OFString *)test inModule: (OFString *)module;
	     inModule: (OFString *)module;
- (void)outputFailure: (OFString *)test
- (void)outputFailure: (OFString *)test inModule: (OFString *)module;
	     inModule: (OFString *)module;
@end

@interface TestsAppDelegate (OFASN1DERParsingTests)
- (void)ASN1DERParsingTests;
@end

@interface TestsAppDelegate (OFASN1DERRepresentationTests)
- (void)ASN1DERRepresentationTests;
@end

@interface TestsAppDelegate (OFArrayTests)
- (void)arrayTests;
@end

@interface TestsAppDelegate (OFBlockTests)
159
160
161
162
163
164
165




166
167
168
169
170
171
172
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159







+
+
+
+







@interface TestsAppDelegate (OFNumberTests)
- (void)numberTests;
@end

@interface TestsAppDelegate (OFObjectTests)
- (void)objectTests;
@end

@interface TestsAppDelegate (OFPBKDF2Tests)
- (void)PBKDF2Tests;
@end

@interface TestsAppDelegate (OFPropertyListTests)
- (void)propertyListTests;
@end

@interface TestsAppDelegate (OFPluginTests)
- (void)pluginTests;
180
181
182
183
184
185
186
187

188
189
190
191
192
193
194
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181







-
+







- (void)runtimeARCTests;
@end

@interface TestsAppDelegate (OFRIPEMD160HashTests)
- (void)RIPEMD160HashTests;
@end

@interface TestsAppDelegate (ScryptTests)
@interface TestsAppDelegate (OFScryptTests)
- (void)scryptTests;
@end

@interface TestsAppDelegate (OFSHA1HashTests)
- (void)SHA1HashTests;
@end

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
191
192
193
194
195
196
197




198
199
200
201
202
203
204







-
-
-
-







- (void)SHA384HashTests;
@end

@interface TestsAppDelegate (OFSHA512HashTests)
- (void)SHA512HashTests;
@end

@interface TestsAppDelegate (OFSCTPSocketTests)
- (void)SCTPSocketTests;
@end

@interface TestsAppDelegate (OFSPXSocketTests)
- (void)SPXSocketTests;
@end

@interface TestsAppDelegate (OFSPXStreamSocketTests)
- (void)SPXStreamSocketTests;
@end
231
232
233
234
235
236
237




238
239
240
241
242
243
244
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231







+
+
+
+







@interface TestsAppDelegate (OFSystemInfoTests)
- (void)systemInfoTests;
@end

@interface TestsAppDelegate (OFHMACTests)
- (void)HMACTests;
@end

@interface TestsAppDelegate (OFSocketTests)
- (void)socketTests;
@end

@interface TestsAppDelegate (OFStreamTests)
- (void)streamTests;
@end

@interface TestsAppDelegate (OFStringTests)
- (void)stringTests;
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
263
264
265
266
267
268
269















-
-
-
-
-
-
-
-
- (void)XMLNodeTests;
@end

@interface TestsAppDelegate (OFXMLParserTests)
    <OFXMLParserDelegate, OFXMLElementBuilderDelegate>
- (void)XMLParserTests;
@end

@interface TestsAppDelegate (PBKDF2Tests)
- (void)PBKDF2Tests;
@end

@interface TestsAppDelegate (SocketTests)
- (void)socketTests;
@end