Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -25,11 +25,12 @@ AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float" LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -meabi -mhard-float" - LIBS="-lfat -lwiiuse -lbte -logc" + LIBS="$LIBS -lfat -logc" + TESTS_LIBS="$TESTS_LIBS -lwiiuse -lbte" ]) AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) case $OBJC in *clang*) @@ -843,11 +844,11 @@ esac AS_IF([test x"$with_wii" = x"yes"], [ dnl Keep this lowercase, as WIILOAD is a variable used by dnl wiiload and thus likely already set by the user to something - dnl that is not the path to the binary. + dnl that is not the path of the wiiload binary. AC_CHECK_PROG(wiiload, wiiload, wiiload) AS_IF([test x"$wiiload" != x""], [ AC_SUBST(TESTS, "tests") AC_SUBST(TEST_LAUNCHER, "$wiiload") @@ -866,10 +867,12 @@ AC_SUBST(CPPFLAGS) dnl We use the OBJC compiler as our assembler AC_SUBST(AS, $OBJC) AC_SUBST(ASFLAGS) AC_SUBST(AS_DEPENDS, $OBJC_DEPENDS) + +AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk Info.plist Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -36,10 +36,11 @@ RUNTIME_RUNTIME_A = @RUNTIME_RUNTIME_A@ RUNTIME_RUNTIME_LIB_A = @RUNTIME_RUNTIME_LIB_A@ RUNTIME_LIB_A = @RUNTIME_LIB_A@ TESTPLUGIN = @TESTPLUGIN@ TESTS = @TESTS@ +TESTS_LIBS = @TESTS_LIBS@ TEST_LAUNCHER = @TEST_LAUNCHER@ USE_INCLUDES_THREADS = @USE_INCLUDES_THREADS@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -94,8 +94,8 @@ pack-pbp $@ PARAM.SFO NULL NULL NULL NULL NULL ${PROG_NOINST} NULL include ../buildsys.mk CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT -LIBS := -L../src -lobjfw ${LIBS} +LIBS := -L../src -lobjfw ${TESTS_LIBS} ${LIBS} LDFLAGS += ${MAP_LDFLAGS} LD = ${OBJC} Index: tests/TestsAppDelegate.h ================================================================== --- tests/TestsAppDelegate.h +++ tests/TestsAppDelegate.h @@ -61,11 +61,11 @@ { int _fails; } - (void)outputString: (OFString*)str - withColor: (int)color; + inColor: (int)color; - (void)outputTesting: (OFString*)test inModule: (OFString*)module; - (void)outputSuccess: (OFString*)test inModule: (OFString*)module; - (void)outputFailure: (OFString*)test Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -85,13 +85,13 @@ [[OFApplication sharedApplication] delegate]; OFString *string = [OFString stringWithFormat: @"\nRuntime error: Unhandled exception:\n%@\n", e]; [delegate outputString: string - withColor: RED]; + inColor: RED]; [delegate outputString: @"Press home button to exit!\n" - withColor: NO_COLOR]; + inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) [OFApplication terminateWithStatus: 1]; @@ -104,11 +104,11 @@ #endif } @implementation TestsAppDelegate - (void)outputString: (OFString*)str - withColor: (int)color + inColor: (int)color { #if defined(_PSP) char i, space = ' '; int y = pspDebugScreenGetY(); @@ -160,36 +160,36 @@ inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: testing...", module, test] - withColor: YELLOW]; + inColor: YELLOW]; [pool release]; } - (void)outputSuccess: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: ok\n", module, test] - withColor: GREEN]; + inColor: GREEN]; [pool release]; } - (void)outputFailure: (OFString*)test inModule: (OFString*)module { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self outputString: [OFString stringWithFormat: @"[%@] %@: failed\n", module, test] - withColor: RED]; + inColor: RED]; [pool release]; #ifdef __wii__ [self outputString: @"Press A to continue!\n" - withColor: NO_COLOR]; + inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_A) return; @@ -203,11 +203,11 @@ { #ifdef _PSP pspDebugScreenInit(); #endif #ifdef __wii__ - [OFFile changeToDirectoryAtPath: @"/objfw-tests"]; + [OFFile changeToDirectoryAtPath: @"/apps/objfw-tests"]; #endif [self objectTests]; #ifdef OF_HAVE_BLOCKS [self blockTests]; @@ -246,11 +246,11 @@ [self propertiesTests]; #endif #ifdef __wii__ [self outputString: @"Press home button to exit!\n" - withColor: NO_COLOR]; + inColor: NO_COLOR]; for (;;) { WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) [OFApplication terminateWithStatus: _fails];