ObjFW  Diff

Differences From Artifact [8cbc481dee]:

To Artifact [c008280f35]:


14
15
16
17
18
19
20




21
22
23
24
25
26
27
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31







+
+
+
+







 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <string.h>

#if !defined(__STDC_NO_COMPLEX__) && defined(HAVE_COMPLEX_H)
# include <complex.h>
#endif

#import "OFMethodSignature.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidFormatException.h"

#import "TestsAppDelegate.h"
42
43
44
45
46
47
48







49
50
51
52
53
54
55
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66







+
+
+
+
+
+
+







	} st;
	union {
		char c;
		int i;
	} u;
	double d;
};

#if !defined(__STDC_NO_COMPLEX__) && defined(HAVE_COMPLEX_H)
struct test3_struct {
	char c;
	complex double cd;
};
#endif

union test3_union {
	char c;
	int i;
	double d;
};

119
120
121
122
123
124
125

126





127
128
129
130

131
132
133
134

135
136
137
138
139
140
141
142
143
144
145

146





147
148
149
150

151
152
153
154

155
156
157
158
159
160
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

147
148
149
150

151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172

173
174
175
176

177
178
179
180
181
182
183







+

+
+
+
+
+



-
+



-
+











+

+
+
+
+
+



-
+



-
+






	    of_sizeof_type_encoding(@encode(struct test1_struct)) ==
	    sizeof(struct test1_struct))

	TEST(@"of_sizeof_type_encoding() #2",
	    of_sizeof_type_encoding(@encode(struct test2_struct)) ==
	    sizeof(struct test2_struct))

#if !defined(__STDC_NO_COMPLEX__) && defined(HAVE_COMPLEX_H)
	TEST(@"of_sizeof_type_encoding() #3",
	    of_sizeof_type_encoding(@encode(struct test3_struct)) ==
	    sizeof(struct test3_struct))
#endif

	TEST(@"of_sizeof_type_encoding() #4",
	    of_sizeof_type_encoding(@encode(union test3_union)) ==
	    sizeof(union test3_union))

	TEST(@"of_sizeof_type_encoding() #4",
	TEST(@"of_sizeof_type_encoding() #5",
	    of_sizeof_type_encoding(@encode(union test4_union)) ==
	    sizeof(union test4_union))

	TEST(@"of_sizeof_type_encoding() #5",
	TEST(@"of_sizeof_type_encoding() #6",
	    of_sizeof_type_encoding(@encode(struct test1_struct [5])) ==
	    sizeof(struct test1_struct [5]))

	TEST(@"of_alignof_type_encoding() #1",
	    of_alignof_type_encoding(@encode(struct test1_struct)) ==
	    OF_ALIGNOF(struct test1_struct))

	TEST(@"of_alignof_type_encoding() #2",
	    of_alignof_type_encoding(@encode(struct test2_struct)) ==
	    OF_ALIGNOF(struct test2_struct))

#if !defined(__STDC_NO_COMPLEX__) && defined(HAVE_COMPLEX_H)
	TEST(@"of_alignof_type_encoding() #3",
	    of_alignof_type_encoding(@encode(struct test3_struct)) ==
	    OF_ALIGNOF(struct test3_struct))
#endif

	TEST(@"of_alignof_type_encoding() #4",
	    of_alignof_type_encoding(@encode(union test3_union)) ==
	    OF_ALIGNOF(union test3_union))

	TEST(@"of_alignof_type_encoding() #4",
	TEST(@"of_alignof_type_encoding() #5",
	    of_alignof_type_encoding(@encode(union test4_union)) ==
	    OF_ALIGNOF(union test4_union))

	TEST(@"of_alignof_type_encoding() #5",
	TEST(@"of_alignof_type_encoding() #6",
	    of_alignof_type_encoding(@encode(struct test1_struct [5])) ==
	    OF_ALIGNOF(struct test1_struct [5]))

	[pool drain];
}
@end