ObjFW  Diff

Differences From Artifact [da1c4d414a]:

To Artifact [1bbbdf67b6]:


12
13
14
15
16
17
18

19
20
21
22
23
24
25
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26







+







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

#include <assert.h>
#include <string.h>

#ifndef __STDC_NO_COMPLEX__
# include <complex.h>
#endif

#import "OFInvocation.h"
264
265
266
267
268
269
270




271
272
273
274
275
276
277
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282







+
+
+
+








	memset(&st, '\xFF', sizeof(st));
	st.c = 0x55;
	st.i = 0xAAAAAAAA;

	TEST(@"+[invocationWithMethodSignature:]",
	    (invocation = [OFInvocation invocationWithMethodSignature: sig]))

#ifdef __clang_analyzer__
	assert(invocation != nil);
#endif

	TEST(@"-[setReturnValue]", R([invocation setReturnValue: &st]))

	TEST(@"-[getReturnValue]", R([invocation getReturnValue: &st2]) &&
	    memcmp(&st, &st2, sizeof(st)) == 0)

	memset(&st2, '\0', sizeof(st2));