]> git.saurik.com Git - apple/objc4.git/blob - test/objectCopy.m
f757cb56b647932f804f5421953d7ce36080984b
[apple/objc4.git] / test / objectCopy.m
1 // TEST_CONFIG MEM=mrc,gc
2
3 #include "test.h"
4 #include <objc/NSObject.h>
5
6 @interface Test : NSObject {
7 char bytes[16-sizeof(void*)];
8 }
9 @end
10 @implementation Test
11 @end
12
13
14 int main()
15 {
16 id o1 = [Test new];
17 id o2 = object_copy(o1, 16);
18 testassert(malloc_size(o1) == 16);
19 testassert(malloc_size(o2) == 32);
20 succeed(__FILE__);
21 }