Changes In Branch objfwtest Through [1cd17a28dd] Excluding Merge-Ins
This is equivalent to a diff from f927a98bcc to 1cd17a28dd
2024-02-10
| ||
10:58 | Remove src/test/Info.plist.in check-in: 52384975f5 user: js tags: objfwtest | |
00:27 | Build ObjFWTest only as a static library check-in: 1cd17a28dd user: js tags: objfwtest | |
2024-02-06
| ||
23:01 | ObjFWTest: Add OTAssert() check-in: 5cd1585ae1 user: js tags: objfwtest | |
20:58 | extra.mk.in: Remove unused variables check-in: b1a90683b9 user: js tags: trunk | |
2024-02-05
| ||
20:42 | Add ObjFWTest check-in: 10f006be37 user: js tags: objfwtest | |
20:01 | bridge: Rename define for local includes check-in: f927a98bcc user: js tags: trunk | |
2024-02-04
| ||
16:48 | Increase ObjFWRT library version check-in: 2d61beb237 user: js tags: trunk | |
Modified .fossil-settings/clean-glob from [e3e476a774] to [97c41e980e].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync tests/plugin/Info.plist tests/subprocess/subprocess | > > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/test/Info.plist src/test/libobjfwtest.* src/tls/Info.plist src/tls/libobjfwtls.* tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync tests/plugin/Info.plist tests/subprocess/subprocess |
︙ | ︙ |
Modified .fossil-settings/ignore-glob from [a531885e00] to [fae5c41137].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/test/Info.plist src/test/libobjfwtest.* src/tls/Info.plist src/tls/libobjfwtls.* tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata |
︙ | ︙ |
Modified .gitignore from [6d829dc2af] to [ecb2a6c378].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/test/Info.plist src/test/libobjfwtest.* src/tls/Info.plist src/tls/libobjfwtls.* tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata |
︙ | ︙ |
Modified configure.ac from [c1b4a8e04b] to [84c8505c23].
︙ | ︙ | |||
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 | AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk src/Info.plist tests/Info.plist utils/objfw-config ]) AC_CONFIG_HEADERS([config.h src/objfw-defs.h]) AC_OUTPUT AS_IF([test x"$old_compiler" = x"yes"], [ | > | 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 | AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk src/Info.plist src/test/Info.plist tests/Info.plist utils/objfw-config ]) AC_CONFIG_HEADERS([config.h src/objfw-defs.h]) AC_OUTPUT AS_IF([test x"$old_compiler" = x"yes"], [ |
︙ | ︙ |
Modified src/Makefile from [2a28ea8f9c] to [faa3d6a6cb].
1 2 3 | include ../extra.mk SUBDIRS = ${RUNTIME} exceptions encodings forwarding | | | 1 2 3 4 5 6 7 8 9 10 11 | include ../extra.mk SUBDIRS = ${RUNTIME} exceptions encodings forwarding SUBDIRS_AFTER = ${BRIDGE} ${TLS} test DISTCLEAN = Info.plist objfw-defs.h SHARED_LIB = ${OBJFW_SHARED_LIB} STATIC_LIB = ${OBJFW_STATIC_LIB} FRAMEWORK = ${OBJFW_FRAMEWORK} LIB_MAJOR = ${OBJFW_LIB_MAJOR} LIB_MINOR = ${OBJFW_LIB_MINOR} |
︙ | ︙ |
Added src/test/Info.plist.in version [55211c1360].
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>ObjFWTest</string> <key>CFBundleName</key> <string>ObjFWTest</string> <key>CFBundleIdentifier</key> <string>im.nil.objfw.test</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleVersion</key> <string>@BUNDLE_VERSION@</string> <key>CFBundleShortVersionString</key> <string>@BUNDLE_SHORT_VERSION@</string> <key>MinimumOSVersion</key> <string>9.0</string> </dict> </plist> |
Added src/test/Makefile version [b269c69e19].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 | include ../../extra.mk DISTCLEAN = Info.plist STATIC_LIB = libobjfwtest.a SRCS = OTAssert.m \ OTTestCase.m INCLUDES := ${SRCS:.m=.h} \ ObjFWTest.h SRCS += OTAppDelegate.m \ OTAssertionFailedException.m includesubdir = ObjFWTest include ../../buildsys.mk CPPFLAGS += -I. \ -I.. \ -I../.. \ -I../exceptions \ -I../runtime \ -DOBJFWTEST_LOCAL_INCLUDES LD = ${OBJC} FRAMEWORK_LIBS := -F.. \ -framework ObjFW \ -F../runtime \ ${RUNTIME_FRAMEWORK_LIBS} \ ${LIBS} LIBS := -L.. -lobjfw -L../runtime ${RUNTIME_LIBS} ${LIBS} install-extra: i=ObjFWTest.oc; \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${libdir}/objfw-config && ${INSTALL} -m 644 $$i ${libdir}/objfw-config/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi uninstall-extra: i=ObjFWTest.oc; \ if test -f ${libdir}/objfw-config/$$i; then \ if rm -f ${libdir}/objfw-config/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi; \ rmdir ${libdir}/objfw-config >/dev/null 2>&1 || true |
Added src/test/OTAppDelegate.h version [64bf862003].
> > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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 "OFApplication.h" OF_ASSUME_NONNULL_BEGIN @interface OTAppDelegate: OFObject <OFApplicationDelegate> @end OF_ASSUME_NONNULL_END |
Added src/test/OTAppDelegate.m version [d77755a8a2].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #include "config.h" #import "OTAppDelegate.h" #import "OFSet.h" #import "OFValue.h" #import "OTTestCase.h" #import "OTAssertionFailedException.h" OF_APPLICATION_DELEGATE(OTAppDelegate) @implementation OTAppDelegate - (OFSet OF_GENERIC(Class) *)testClasses { Class *classes = objc_copyClassList(NULL); OFMutableSet *testClasses; if (classes == NULL) return nil; @try { testClasses = [OFMutableSet set]; for (Class *iter = classes; *iter != Nil; iter++) if ([*iter isSubclassOfClass: [OTTestCase class]]) [testClasses addObject: *iter]; } @finally { OFFreeMemory(classes); } [testClasses removeObject: [OTTestCase class]]; [testClasses makeImmutable]; return testClasses; } - (OFSet OF_GENERIC(OFValue *) *)testsInClass: (Class)class { Method *methods = class_copyMethodList(class, NULL); OFMutableSet *tests; if (methods == NULL) return nil; @try { tests = [OFMutableSet set]; for (Method *iter = methods; *iter != NULL; iter++) { SEL selector = method_getName(*iter); if (selector == NULL) continue; if (strncmp(sel_getName(selector), "test", 4) == 0) [tests addObject: [OFValue valueWithPointer: selector]]; } } @finally { OFFreeMemory(methods); } [tests makeImmutable]; return tests; } - (void)applicationDidFinishLaunching: (OFNotification *)notification { OFSet OF_GENERIC(Class) *testClasses = [self testClasses]; for (Class class in testClasses) { for (OFValue *test in [self testsInClass: class]) { void *pool = objc_autoreleasePoolPush(); OTTestCase *instance = [[[class alloc] init] autorelease]; @try { [instance setUp]; [instance performSelector: test.pointerValue]; } @catch (OTAssertionFailedException *e) { /* * If an assertion during -[setUp], don't run * the test. * If an assertion fails during a test, abort * the test. */ } @try { [instance tearDown]; } @catch (OTAssertionFailedException *e) { /* * If an assertion fails during -[tearDown], * abort the tear down. */ } objc_autoreleasePoolPop(pool); } } [OFApplication terminate]; } @end |
Added src/test/OTAssert.h version [43ca8fc8fa].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #define OTAssert(cond, ...) \ OTAssertImpl(self, _cmd, cond, @#cond, @__FILE__, __LINE__, \ ## __VA_ARGS__, nil) #define OTAssertTrue(cond, ...) OTAssert(cond == true, ## __VA_ARGS__) #define OTAssertFalse(cond, ...) OTAssert(cond == false, ## __VA_ARGS__) #define OTAssertEqual(a, b, ...) OTAssert(a == b, ## __VA_ARGS__) #define OTAssertNotEqual(a, b, ...) OTAssert(a != b, ## __VA_ARGS__) #define OTAssertEqualObjects(a, b, ...) OTAssert([a isEqual: b], ## __VA_ARGS__) #define OTAssertNotEqualObjects(a, b, ...) \ OTAssert(![a isEqual: b], ## __VA_ARGS__) #ifdef __cplusplus extern "C" { #endif extern void OTAssertImpl(id testCase, SEL test, bool condition, OFString *check, OFString *file, size_t line, ...); #ifdef __cplusplus } #endif |
Added src/test/OTAssert.m version [8c54d0fe0f].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #include "config.h" #import "OFColor.h" #import "OFStdIOStream.h" #import "OFString.h" #import "OTAssertionFailedException.h" void OTAssertImpl(id testCase, SEL test, bool condition, OFString *check, OFString *file, size_t line, ...) { void *pool; va_list arguments; OFConstantString *format; OFString *message = nil; if (condition) return; pool = objc_autoreleasePoolPush(); va_start(arguments, line); format = va_arg(arguments, OFConstantString *); if (format != nil) message = [[[OFString alloc] initWithFormat: format arguments: arguments] autorelease]; va_end(arguments); [OFStdErr setForegroundColor: [OFColor red]]; [OFStdErr writeFormat: @"-[%@ %s]: Condition failed: %@%@%@\n", [testCase className], sel_getName(test), check, (message != nil ? @": " : @""), (message != nil ? message : @"")]; [OFStdErr reset]; objc_autoreleasePoolPop(pool); @throw [OTAssertionFailedException exception]; } |
Added src/test/OTAssertionFailedException.h version [ae3f64510c].
> > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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 "OFException.h" @interface OTAssertionFailedException: OFException @end |
Added src/test/OTAssertionFailedException.m version [f90fe6b716].
> > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #include "config.h" #import "OTAssertionFailedException.h" @implementation OTAssertionFailedException @end |
Added src/test/OTTestCase.h version [2add704de5].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #ifdef OBJFWTEST_LOCAL_INCLUDES # import "OFObject.h" #else # import <ObjFW/OFObject.h> #endif OF_ASSUME_NONNULL_BEGIN @interface OTTestCase: OFObject - (void)setUp; - (void)tearDown; @end OF_ASSUME_NONNULL_END |
Added src/test/OTTestCase.m version [3c3d45f200].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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. */ #include "config.h" #import "OTTestCase.h" @implementation OTTestCase: OFObject - (void)setUp { } - (void)tearDown { } @end |
Added src/test/ObjFWTest.h version [c6fa64803a].
> > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /* * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * 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 "OTTestCase.h" #import "OTAssert.h" |
Added src/test/ObjFWTest.oc version [9b450b95b7].
> > > | 1 2 3 | package_format 1 LIBS="-lobjfwtest $LIBS" FRAMEWORK_LIBS="-framework ObjFWTest $FRAMEWORK_LIBS" |