Differences From Artifact [fb941f8116]:
- File
tests/TestsAppDelegate.m
— part of check-in
[766eedef4c]
at
2017-01-19 23:08:16
on branch trunk
— Add support for disabling encodings
This allows building a smaller ObjFW if those are not needed. (user: js, size: 10648) [annotate] [blame] [check-ins using]
To Artifact [5233b264a3]:
- File
tests/TestsAppDelegate.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 10656) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
201 202 203 204 205 206 207 | } #else return of_application_main(&argc, &argv, [TestsAppDelegate class]); #endif } @implementation TestsAppDelegate | | | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | } #else return of_application_main(&argc, &argv, [TestsAppDelegate class]); #endif } @implementation TestsAppDelegate - (void)outputString: (OFString *)str inColor: (int)color { #if defined(OF_PSP) char space = ' '; int y = pspDebugScreenGetY(); pspDebugScreenSetXY(0, y); |
︙ | ︙ | |||
257 258 259 260 261 262 263 | #elif defined(STDOUT_SIMPLE) [of_stdout writeString: str]; #else # error No output method! #endif } | | | | | | | | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | #elif defined(STDOUT_SIMPLE) [of_stdout writeString: str]; #else # error No output method! #endif } - (void)outputTesting: (OFString *)test inModule: (OFString *)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; #ifndef STDOUT_SIMPLE [self outputString: [OFString stringWithFormat: @"[%@] %@: testing...", module, test] inColor: YELLOW]; #else [self outputString: [OFString stringWithFormat: @"[%@] %@: ", module, test] inColor: YELLOW]; #endif [pool release]; } - (void)outputSuccess: (OFString *)test inModule: (OFString *)module { #ifndef STDOUT_SIMPLE OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: ok\n", module, test] inColor: GREEN]; [pool release]; #else [self outputString: @"ok\n" inColor: GREEN]; #endif } - (void)outputFailure: (OFString *)test inModule: (OFString *)module { #ifndef STDOUT_SIMPLE OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: failed\n", module, test] inColor: RED]; [pool release]; |
︙ | ︙ | |||
368 369 370 371 372 373 374 | if (!CFURLGetFileSystemRepresentation(resourcesURL, true, resourcesPath, PATH_MAX)) { [of_stderr writeString: @"Failed to locate resources!\n"]; [OFApplication terminateWithStatus: 1]; } [[OFFileManager defaultManager] changeCurrentDirectoryPath: | | | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | if (!CFURLGetFileSystemRepresentation(resourcesURL, true, resourcesPath, PATH_MAX)) { [of_stderr writeString: @"Failed to locate resources!\n"]; [OFApplication terminateWithStatus: 1]; } [[OFFileManager defaultManager] changeCurrentDirectoryPath: [OFString stringWithUTF8String: (const char *)resourcesPath]]; #endif #if defined(OF_WII) && defined(OF_HAVE_FILES) [[OFFileManager defaultManager] changeCurrentDirectoryPath: @"/apps/objfw-tests"]; #endif [self runtimeTests]; |
︙ | ︙ |