~ubuntu-branches/ubuntu/lucid/gauche-c-wrapper/lucid

« back to all changes in this revision

Viewing changes to testsuite/objc-test.h

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2008-04-07 09:15:03 UTC
  • Revision ID: james.westby@ubuntu.com-20080407091503-wu0h414koe95kj4i
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#import <Foundation/Foundation.h>
 
2
 
 
3
typedef struct test_large_rec {
 
4
    int a;
 
5
    int b;
 
6
} TestLarge;
 
7
 
 
8
typedef struct test_small_rec {
 
9
    char a;
 
10
    char b;
 
11
} TestSmall;
 
12
 
 
13
typedef union test_large_union_rec {
 
14
    int a;
 
15
    long b;
 
16
} TestLargeUnion;
 
17
 
 
18
typedef struct test_small_union_rec {
 
19
    char a;
 
20
    char b;
 
21
} TestSmallUnion;
 
22
 
 
23
@interface OBJCTest : NSObject {
 
24
}
 
25
 
 
26
+ (int)staticMethod;
 
27
 
 
28
- (unsigned char)incrementUnsignedChar:(unsigned char)v;
 
29
- (signed char)incrementSignedChar:(signed char)v;
 
30
- (unsigned short)incrementUnsignedShort:(unsigned short)v;
 
31
- (signed short)incrementSignedShort:(signed short)v;
 
32
- (unsigned int)incrementUnsignedInt:(unsigned int)v;
 
33
- (signed int)incrementSignedInt:(signed int)v;
 
34
- (unsigned long)incrementUnsignedLong:(unsigned long)v;
 
35
- (signed long)incrementSignedLong:(signed long)v;
 
36
- (unsigned long long)incrementUnsignedLongLong:(unsigned long long)v;
 
37
- (signed long long)incrementSignedLongLong:(signed long long)v;
 
38
- (float)addFloat:(float)v1 and:(float)v2;
 
39
- (double)addDouble:(double)v1 and:(double)v2;
 
40
- (NSString*)appendString:(NSString*)str1 and:(NSString*)str2;
 
41
- (TestLarge)addLargeStruct:(TestLarge)data valA:(int)a valB:(int)b;
 
42
- (TestSmall)addSmallStruct:(TestSmall)data valA:(char)a valB:(char)b;
 
43
- (TestLargeUnion)addLargeUnion:(TestLargeUnion)data valA:(int)a;
 
44
- (TestSmallUnion)addSmallUnion:(TestSmallUnion)data valA:(char)a;
 
45
- (void)overwriteData:(TestLarge*)data;
 
46
 
 
47
@end
 
48
 
 
49
inline NSString *returnString()
 
50
{
 
51
    return @"foo";
 
52
}
 
53
 
 
54
inline NSString *inlineAppendString(NSString *str1, NSString *str2)
 
55
{
 
56
    OBJCTest *obj = [[OBJCTest alloc] init];
 
57
    return [obj appendString:str1 and:str2];
 
58
}
 
59
 
 
60
inline SEL inlineSelector()
 
61
{
 
62
    return @selector(init);
 
63
}
 
64