ObjFW  Check-in [ab933fe0e6]

Overview
Comment:Merge trunk into branch "objfwtest"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | objfwtest
Files: files | file ages | folders
SHA3-256: ab933fe0e65423f7bc2f8fc06ceaf8199c3a5b338b831c89fb633cfa657d02e3
User & Date: js on 2024-02-10 13:16:36
Other Links: branch diff | manifest | tags
Context
2024-02-10
13:35
Migrate OFNumberTests to ObjFWTest check-in: fae3eee5c7 user: js tags: objfwtest
13:16
Merge trunk into branch "objfwtest" check-in: ab933fe0e6 user: js tags: objfwtest
13:14
Silence warnings coming from OTAssert.h check-in: f264948665 user: js tags: trunk
12:51
Unconditionally depend on libobjfw.a check-in: 6143f9a5ed user: js tags: objfwtest
Changes

Modified .fossil-settings/clean-glob from [6d35382888] to [54b92eab34].

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
new_tests/tests.rpx
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







<
|







36
37
38
39
40
41
42

43
44
45
46
47
48
49
50
new_tests/tests.rpx
src/Info.plist
src/bridge/Info.plist
src/libobjfw.*
src/objfw-defs.h
src/runtime/Info.plist
src/runtime/libobjfwrt.*

src/test/libobjfwtest.a
src/tls/Info.plist
src/tls/libobjfwtls.*
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/objc_sync/objc_sync

Modified .fossil-settings/ignore-glob from [e05011aeb7] to [c464bd8750].

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
new_tests/tests.rpx
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







<
|







38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
new_tests/tests.rpx
src/Info.plist
src/bridge/Info.plist
src/libobjfw.*
src/objfw-defs.h
src/runtime/Info.plist
src/runtime/libobjfwrt.*

src/test/libobjfwtest.a
src/tls/Info.plist
src/tls/libobjfwtls.*
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/iOS.xcodeproj/*.pbxuser

Modified .gitignore from [b0ddfd7380] to [09fa2b249f].

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
new_tests/tests.rpx
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







<
|







38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
new_tests/tests.rpx
src/Info.plist
src/bridge/Info.plist
src/libobjfw.*
src/objfw-defs.h
src/runtime/Info.plist
src/runtime/libobjfwrt.*

src/test/libobjfwtest.a
src/tls/Info.plist
src/tls/libobjfwtls.*
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/iOS.xcodeproj/*.pbxuser

Modified extra.mk.in from [6ed0317cce] to [3687ff7a31].

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@
RUNTIME = @RUNTIME@
RUNTIME_ARC_TESTS_M = @RUNTIME_ARC_TESTS_M@
RUNTIME_AUTORELEASE_M = @RUNTIME_AUTORELEASE_M@
RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@
RUNTIME_INSTANCE_M = @RUNTIME_INSTANCE_M@
RUNTIME_LIBS = @RUNTIME_LIBS@
SFDC_INLINE_H = @SFDC_INLINE_H@
SFDC_TARGET = @SFDC_TARGET@
SFD_FILE = @SFD_FILE@
SUBPROCESS = @SUBPROCESS@
TESTPLUGIN = @TESTPLUGIN@
TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@
TESTS_LIBS = @TESTS_LIBS@
TESTS_STATIC_LIB = @TESTS_STATIC_LIB@
TLS = @TLS@
TLS_CPPFLAGS = @TLS_CPPFLAGS@







<
<
<







67
68
69
70
71
72
73



74
75
76
77
78
79
80
REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@
RUNTIME = @RUNTIME@
RUNTIME_ARC_TESTS_M = @RUNTIME_ARC_TESTS_M@
RUNTIME_AUTORELEASE_M = @RUNTIME_AUTORELEASE_M@
RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@
RUNTIME_INSTANCE_M = @RUNTIME_INSTANCE_M@
RUNTIME_LIBS = @RUNTIME_LIBS@



SUBPROCESS = @SUBPROCESS@
TESTPLUGIN = @TESTPLUGIN@
TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@
TESTS_LIBS = @TESTS_LIBS@
TESTS_STATIC_LIB = @TESTS_STATIC_LIB@
TLS = @TLS@
TLS_CPPFLAGS = @TLS_CPPFLAGS@

Modified src/test/OTAppDelegate.m from [7aa90ae52e] to [7058ecd776].

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
			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.
				 */
				[OFStdOut setForegroundColor: [OFColor red]];
				[OFStdOut writeFormat:
				    @"\r-[%@ %s]: failed\n",
				    class, sel_getName(test.pointerValue)];







|
|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
			instance = [[[class alloc] init] autorelease];

			@try {
				[instance setUp];
				[instance performSelector: test.pointerValue];
			} @catch (OTAssertionFailedException *e) {
				/*
				 * If an assertion fails during -[setUp], don't
				 * run the test.
				 * If an assertion fails during a test, abort
				 * the test.
				 */
				[OFStdOut setForegroundColor: [OFColor red]];
				[OFStdOut writeFormat:
				    @"\r-[%@ %s]: failed\n",
				    class, sel_getName(test.pointerValue)];

Modified src/test/OTAssert.h from [ab93272df2] to [42d7fc43e9].

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
 *
 * 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 __clang__




# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
# pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif
#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 __clang__
# pragma clang diagnostic pop
#endif

#ifdef __cplusplus
extern "C" {
#endif
extern void OTAssertImpl(id testCase, SEL test, bool condition, OFString *check,
    OFString *file, size_t line, ...);
#ifdef __cplusplus
}
#endif







<
>
>
>
>
|
|
<
<










<
<
<









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
 *
 * 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.
 */


/*
 * Unfortunately, that's the only way to make all compilers happy with the GNU
 * extensions for variadic macros that are being used here.
 */
#pragma GCC system_header



#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