22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import "TestsAppDelegate.h"
#if defined(STDOUT) && (defined(OF_WINDOWS) || defined(OF_MSDOS))
# undef STDOUT
# define STDOUT_SIMPLE
#endif
#ifdef OF_PSP
# include <pspmoduleinfo.h>
# include <pspkernel.h>
# include <pspdebug.h>
# include <pspctrl.h>
PSP_MODULE_INFO("ObjFW Tests", 0, 0, 0);
|
>
>
>
>
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#import "TestsAppDelegate.h"
#if defined(STDOUT) && (defined(OF_WINDOWS) || defined(OF_MSDOS))
# undef STDOUT
# define STDOUT_SIMPLE
#endif
#ifdef OF_IOS
# include <CoreFoundation/CoreFoundation.h>
#endif
#ifdef OF_PSP
# include <pspmoduleinfo.h>
# include <pspkernel.h>
# include <pspdebug.h>
# include <pspctrl.h>
PSP_MODULE_INFO("ObjFW Tests", 0, 0, 0);
|
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
[self outputString: @"failed\n"
inColor: RED];
#endif
}
- (void)applicationDidFinishLaunching
{
#if defined(OF_WII) && defined(OF_HAVE_FILES)
[[OFFileManager defaultManager]
changeCurrentDirectoryPath: @"/apps/objfw-tests"];
#endif
[self runtimeTests];
[self forwardingTests];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
[self outputString: @"failed\n"
inColor: RED];
#endif
}
- (void)applicationDidFinishLaunching
{
#if defined(OF_IOS) && defined(OF_HAVE_FILES)
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
UInt8 resourcesPath[PATH_MAX];
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];
[self forwardingTests];
|
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
|
[self serializationTests];
#endif
[self JSONTests];
#ifdef OF_HAVE_PLUGINS
[self pluginTests];
#endif
#if defined(OF_WII)
[self outputString: @"Press home button to exit!\n"
inColor: NO_COLOR];
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME)
[OFApplication terminateWithStatus: _fails];
|
>
>
>
>
>
|
|
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
[self serializationTests];
#endif
[self JSONTests];
#ifdef OF_HAVE_PLUGINS
[self pluginTests];
#endif
#if defined(OF_IOS)
[self outputString: [OFString stringWithFormat: @"%d tests failed!",
_fails]
inColor: NO_COLOR];
[OFApplication terminateWithStatus: _fails];
#elif defined(OF_WII)
[self outputString: @"Press home button to exit!\n"
inColor: NO_COLOR];
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME)
[OFApplication terminateWithStatus: _fails];
|