1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2021 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.
*
|
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2022 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.
*
|
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
|
#if defined(HAVE_COMPLEX_H) && !defined(__STDC_NO_COMPLEX__)
# include <complex.h>
#endif
#import "TestsAppDelegate.h"
static OFString *module = @"OFInvocation";
struct test_struct {
unsigned char c;
unsigned int i;
};
@implementation TestsAppDelegate (OFInvocationTests)
- (struct test_struct)invocationTestMethod1: (unsigned char)c
: (unsigned int)i
: (struct test_struct *)ptr
: (struct test_struct)st
{
return st;
}
#ifdef OF_INVOCATION_CAN_INVOKE
- (void)invocationTestMethod2: (id)obj
{
|
|
|
|
|
|
|
|
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
|
#if defined(HAVE_COMPLEX_H) && !defined(__STDC_NO_COMPLEX__)
# include <complex.h>
#endif
#import "TestsAppDelegate.h"
static OFString *const module = @"OFInvocation";
struct TestStruct {
unsigned char c;
unsigned int i;
};
@implementation TestsAppDelegate (OFInvocationTests)
- (struct TestStruct)invocationTestMethod1: (unsigned char)c
: (unsigned int)i
: (struct TestStruct *)ptr
: (struct TestStruct)st
{
return st;
}
#ifdef OF_INVOCATION_CAN_INVOKE
- (void)invocationTestMethod2: (id)obj
{
|
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
- (void)invocationTests
{
void *pool = objc_autoreleasePoolPush();
SEL selector = @selector(invocationTestMethod1::::);
OFMethodSignature *sig = [self methodSignatureForSelector: selector];
OFInvocation *invocation;
struct test_struct st, st2, *stp = &st, *stp2;
unsigned const char c = 0xAA;
unsigned char c2;
const unsigned int i = 0x55555555;
unsigned int i2;
memset(&st, '\xFF', sizeof(st));
st.c = 0x55;
|
|
|
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
- (void)invocationTests
{
void *pool = objc_autoreleasePoolPush();
SEL selector = @selector(invocationTestMethod1::::);
OFMethodSignature *sig = [self methodSignatureForSelector: selector];
OFInvocation *invocation;
struct TestStruct st, st2, *stp = &st, *stp2;
unsigned const char c = 0xAA;
unsigned char c2;
const unsigned int i = 0x55555555;
unsigned int i2;
memset(&st, '\xFF', sizeof(st));
st.c = 0x55;
|