ObjFW  Check-in [6186d3b518]

Overview
Comment:ObjFWTest: Use more, even nicer colors
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6186d3b518a983bcce1e9f415281389ec9fbac3530998b5b9f583b2800b69c01
User & Date: js on 2024-02-11 15:18:19
Other Links: manifest | tags
Context
2024-02-12
19:55
OFMapTable: Fix type mismatch on OFHashSeed check-in: 26ea8fefec user: js tags: trunk
2024-02-11
15:18
Merge trunk into branch "objfwtest" check-in: 39545b8c5d user: js tags: objfwtest
15:18
ObjFWTest: Use more, even nicer colors check-in: 6186d3b518 user: js tags: trunk
15:00
ObjFWTest: Use nicer colors check-in: 5b3ba754b6 user: js tags: trunk
Changes

Modified src/test/OTAppDelegate.m from [45c4eb9c1a] to [3e448c799c].

147
148
149
150
151
152
153
154



155
156
157
158
159
160
161
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163







-
+
+
+







	size_t numSucceeded = 0, numFailed = 0;

	[OFStdOut writeFormat: @"Running %zu test case(s)\n",
			       testClasses.count];

	for (Class class in testClasses) {
		[OFStdOut setForegroundColor: [OFColor teal]];
		[OFStdOut writeFormat: @"Running tests in %@\n", class];
		[OFStdOut writeFormat: @"Running ", class];
		[OFStdOut setForegroundColor: [OFColor aqua]];
		[OFStdOut writeFormat: @"%@\n", class];
		[OFStdOut reset];

		for (OFValue *test in [self testsInClass: class]) {
			void *pool = objc_autoreleasePoolPush();
			bool failed = false;
			OTTestCase *instance;

210
211
212
213
214
215
216
217
218
219








220
221
222
223
224
212
213
214
215
216
217
218



219
220
221
222
223
224
225
226
227
228
229
230
231







-
-
-
+
+
+
+
+
+
+
+





			} else
				numFailed++;

			objc_autoreleasePoolPop(pool);
		}
	}

	[OFStdOut setForegroundColor: [OFColor purple]];
	[OFStdOut writeFormat: @"%zu test(s) succeeded, %zu test(s) failed.\n",
			       numSucceeded, numFailed];
	[OFStdOut setForegroundColor: [OFColor fuchsia]];
	[OFStdOut writeFormat: @"%zu", numSucceeded];
	[OFStdOut setForegroundColor: [OFColor purple]];
	[OFStdOut writeString: @" test(s) succeeded, "];
	[OFStdOut setForegroundColor: [OFColor fuchsia]];
	[OFStdOut writeFormat: @"%zu", numFailed];
	[OFStdOut setForegroundColor: [OFColor purple]];
	[OFStdOut writeLine: @" test(s) failed."];
	[OFStdOut reset];

	[OFApplication terminateWithStatus: (int)numFailed];
}
@end