mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-12-11 13:35:00 +00:00
some more tests, not all of which pass yet.
This commit is contained in:
parent
d6ad504436
commit
99623c9996
16
testing/UnitTests/ForEach.h
Normal file
16
testing/UnitTests/ForEach.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// ForEach.h
|
||||
// UnitTests
|
||||
//
|
||||
// Created by Johannes Fortmann on 18.04.08.
|
||||
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
|
||||
@interface ForEach : SenTestCase {
|
||||
|
||||
}
|
||||
|
||||
@end
|
122
testing/UnitTests/ForEach.m
Normal file
122
testing/UnitTests/ForEach.m
Normal file
@ -0,0 +1,122 @@
|
||||
/* Copyright (c) 2008 Johannes Fortmann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#import "ForEach.h"
|
||||
|
||||
|
||||
@implementation ForEach
|
||||
-(void)testMutableArray
|
||||
{
|
||||
NSMutableArray *array=[NSMutableArray new];
|
||||
NSMutableArray *array2=[NSMutableArray new];
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
[array addObject:[NSNumber numberWithInt:rand()]];
|
||||
}
|
||||
|
||||
for(id object in array)
|
||||
{
|
||||
[array2 addObject:object];
|
||||
}
|
||||
|
||||
STAssertEqualObjects(array, array2, nil);
|
||||
}
|
||||
|
||||
-(void)mutateArray:(id)array
|
||||
{
|
||||
for(id object in array)
|
||||
{
|
||||
[array addObject:object];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)testArrayMutation
|
||||
{
|
||||
NSMutableArray *array=[NSMutableArray new];
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
[array addObject:[NSNumber numberWithInt:rand()]];
|
||||
}
|
||||
STAssertThrows([self mutateArray:array], nil);
|
||||
}
|
||||
|
||||
|
||||
-(void)testArray
|
||||
{
|
||||
NSMutableArray *array=[NSMutableArray new];
|
||||
NSMutableArray *array2=[NSMutableArray new];
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
[array addObject:[NSNumber numberWithInt:rand()]];
|
||||
}
|
||||
|
||||
array=[[array copy] autorelease];
|
||||
|
||||
for(id object in array)
|
||||
{
|
||||
[array2 addObject:object];
|
||||
}
|
||||
|
||||
STAssertEqualObjects(array, array2, nil);
|
||||
}
|
||||
|
||||
|
||||
-(void)testSmall
|
||||
{
|
||||
NSMutableArray *array=[NSMutableArray new];
|
||||
NSMutableArray *array2=[NSMutableArray new];
|
||||
for(int i=0; i<12; i++)
|
||||
{
|
||||
[array addObject:[NSNumber numberWithInt:rand()]];
|
||||
}
|
||||
|
||||
for(id object in array)
|
||||
{
|
||||
[array2 addObject:object];
|
||||
}
|
||||
|
||||
STAssertEqualObjects(array, array2, nil);
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)testSet
|
||||
{
|
||||
NSMutableSet *set=[NSMutableSet new];
|
||||
NSMutableSet *set2=[NSMutableSet new];
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
[set addObject:[NSNumber numberWithInt:rand()]];
|
||||
}
|
||||
|
||||
for(id object in set)
|
||||
{
|
||||
[set2 addObject:object];
|
||||
}
|
||||
|
||||
STAssertEqualObjects(set, set2, nil);
|
||||
}
|
||||
|
||||
-(void)testCountedSet
|
||||
{
|
||||
NSMutableSet *set=[NSCountedSet new];
|
||||
NSMutableSet *set2=[NSCountedSet new];
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
[set addObject:[NSNumber numberWithInt:rand()%999]];
|
||||
}
|
||||
|
||||
for(id object in set)
|
||||
{
|
||||
[set2 addObject:object];
|
||||
}
|
||||
|
||||
STAssertFalse([set isEqual:set2], @"should enumerate distinct objects");
|
||||
STAssertEquals([set count], [set2 count], @"number of distinct objects should be the same");
|
||||
}
|
||||
@end
|
32
testing/UnitTests/Forwarding.h
Normal file
32
testing/UnitTests/Forwarding.h
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// Forwarding.h
|
||||
// UnitTests
|
||||
//
|
||||
// Created by Johannes Fortmann on 19.04.08.
|
||||
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
|
||||
@interface Forwarding : SenTestCase
|
||||
{
|
||||
BOOL beenInMethodFlag;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float a;
|
||||
long long b;
|
||||
char padding[27];
|
||||
char c;
|
||||
struct
|
||||
{
|
||||
float d;
|
||||
double e;
|
||||
};
|
||||
} TestingStruct;
|
179
testing/UnitTests/Forwarding.m
Normal file
179
testing/UnitTests/Forwarding.m
Normal file
@ -0,0 +1,179 @@
|
||||
/* Copyright (c) 2008 Johannes Fortmann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
|
||||
#import "Forwarding.h"
|
||||
|
||||
|
||||
@interface Forwarding (UnimplementedMethods)
|
||||
-(float)doStuffWithFloats:(float)first :(float)second :(float)third;
|
||||
-(int)doStuffWithInts:(int)first :(int)second :(int)third;
|
||||
-(NSString*)doStuffWithObjects:(NSString*)first :(NSString*)second :(NSString*)third;
|
||||
-(id)doStuffWithStructs:(NSSize)size :(char)c :(NSRange)range :(NSRect)rect :(double)d :(long long)l;
|
||||
-(TestingStruct)testingStructWithParam:(float)x;
|
||||
@end
|
||||
|
||||
@implementation Forwarding
|
||||
-(void)forwardInvocation:(NSInvocation*)inv
|
||||
{
|
||||
if([inv selector]==@selector(doStuffWithObjects:::))
|
||||
{
|
||||
[inv setSelector:@selector(concatObjects:::)];
|
||||
[inv invoke];
|
||||
return;
|
||||
}
|
||||
if([inv selector]==@selector(doStuffWithInts:::))
|
||||
{
|
||||
[inv setSelector:@selector(addInts:::)];
|
||||
[inv invoke];
|
||||
return;
|
||||
}
|
||||
if([inv selector]==@selector(doStuffWithFloats:::))
|
||||
{
|
||||
[inv setSelector:@selector(addFloats:::)];
|
||||
[inv invoke];
|
||||
return;
|
||||
}
|
||||
if([inv selector]==@selector(doStuffWithStructs::::::))
|
||||
{
|
||||
[inv setSelector:@selector(makeStringFromStructs::::::)];
|
||||
[inv invoke];
|
||||
return;
|
||||
}
|
||||
if([inv selector]==@selector(testingStructWithParam:))
|
||||
{
|
||||
[inv setSelector:@selector(returnTestingStructWithParam:)];
|
||||
[inv invoke];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
[super forwardInvocation:inv];
|
||||
}
|
||||
|
||||
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel
|
||||
{
|
||||
if(sel==@selector(doStuffWithObjects:::))
|
||||
return [self methodSignatureForSelector:@selector(concatObjects:::)];
|
||||
|
||||
if(sel==@selector(doStuffWithInts:::))
|
||||
return [self methodSignatureForSelector:@selector(addInts:::)];
|
||||
|
||||
if(sel==@selector(doStuffWithFloats:::))
|
||||
return [self methodSignatureForSelector:@selector(addFloats:::)];
|
||||
|
||||
if(sel==@selector(doStuffWithStructs::::::))
|
||||
return [self methodSignatureForSelector:@selector(makeStringFromStructs::::::)];
|
||||
|
||||
if(sel==@selector(testingStructWithParam:))
|
||||
return [self methodSignatureForSelector:@selector(returnTestingStructWithParam:)];
|
||||
|
||||
return [super methodSignatureForSelector:sel];
|
||||
}
|
||||
|
||||
-(NSString*)concatObjects:(NSString*)first :(NSString*)second :(NSString*)third
|
||||
{
|
||||
beenInMethodFlag=YES;
|
||||
return [NSString stringWithFormat:@"%@%@%@", first, second, third];
|
||||
}
|
||||
|
||||
-(int)addInts:(int)first :(int)second :(int)third
|
||||
{
|
||||
beenInMethodFlag=YES;
|
||||
return first+second+third;
|
||||
}
|
||||
|
||||
-(float)addFloats:(float)first :(float)second :(float)third
|
||||
{
|
||||
beenInMethodFlag=YES;
|
||||
return first+second+third;
|
||||
}
|
||||
|
||||
|
||||
-(void)testForwardSimple
|
||||
{
|
||||
beenInMethodFlag=NO;
|
||||
id retObj=[self doStuffWithObjects:@"First" :@"Second" :@"Third"];
|
||||
|
||||
STAssertTrue(beenInMethodFlag, nil);
|
||||
STAssertEqualObjects(@"FirstSecondThird", retObj, nil);
|
||||
|
||||
beenInMethodFlag=NO;
|
||||
int retInt=[self doStuffWithInts:1 :2 :3];
|
||||
|
||||
STAssertTrue(beenInMethodFlag, nil);
|
||||
STAssertEquals(6, retInt, nil);
|
||||
|
||||
beenInMethodFlag=NO;
|
||||
float retFloat=[self doStuffWithFloats:1. :2. :3.];
|
||||
|
||||
STAssertTrue(beenInMethodFlag, nil);
|
||||
STAssertEqualsWithAccuracy(6.0f, retFloat, 0.001, nil);
|
||||
}
|
||||
|
||||
-(id)makeStringFromStructs:(NSSize)size :(char)c :(NSRange)range :(NSRect)rect :(double)d :(long long)l
|
||||
{
|
||||
beenInMethodFlag=YES;
|
||||
return [NSString stringWithFormat:@"%i %i %i %i %i %i %i %i %i %i %i",
|
||||
(int)size.width, (int)size.height,
|
||||
c,
|
||||
range.location, range.length,
|
||||
(int)rect.origin.x, (int)rect.origin.y,
|
||||
(int)rect.size.width, (int)rect.size.height,
|
||||
(int)d, (int)l];
|
||||
}
|
||||
|
||||
-(TestingStruct)returnTestingStructWithParam:(float)x
|
||||
{
|
||||
beenInMethodFlag=YES;
|
||||
TestingStruct ret={0};
|
||||
ret.a=x;
|
||||
ret.b=x+1;
|
||||
ret.c=x+2;
|
||||
ret.d=x+3;
|
||||
ret.e=x+4;
|
||||
return ret;
|
||||
}
|
||||
|
||||
-(void)testForwardStructs
|
||||
{
|
||||
beenInMethodFlag=NO;
|
||||
id retObj=[self doStuffWithStructs:NSMakeSize(1, 2)
|
||||
:3
|
||||
:NSMakeRange(4, 5)
|
||||
:NSMakeRect(6, 7, 8, 9)
|
||||
:10
|
||||
:11];
|
||||
|
||||
STAssertTrue(beenInMethodFlag, nil);
|
||||
STAssertEqualObjects(@"1 2 3 4 5 6 7 8 9 10 11", retObj, nil);
|
||||
}
|
||||
|
||||
-(void)testStructReturn
|
||||
{
|
||||
// this crashes with llvm, which the tester doesn't catch. Just return for now.
|
||||
STFail(nil);
|
||||
return;
|
||||
|
||||
beenInMethodFlag=NO;
|
||||
int x=12;
|
||||
TestingStruct ret=[self testingStructWithParam:x];
|
||||
TestingStruct cmp={0};
|
||||
cmp.a=x;
|
||||
cmp.b=x+1;
|
||||
cmp.c=x+2;
|
||||
cmp.d=x+3;
|
||||
cmp.e=x+4;
|
||||
|
||||
STAssertTrue(beenInMethodFlag, nil);
|
||||
STAssertEquals(ret, cmp, nil);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -15,3 +15,12 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@interface KVCArrayContainer : NSObject
|
||||
{
|
||||
NSMutableArray *_contents;
|
||||
}
|
||||
|
||||
@end
|
@ -10,11 +10,59 @@
|
||||
|
||||
@implementation KVC
|
||||
-(void)testKVC
|
||||
{
|
||||
{
|
||||
NSMutableDictionary *dict=[NSMutableDictionary dictionary];
|
||||
|
||||
[dict setValue:@"value" forKey:@"key"];
|
||||
|
||||
STAssertEqualObjects([dict valueForKey:@"key"] , @"value", nil);
|
||||
}
|
||||
|
||||
-(void)testMutableArray
|
||||
{
|
||||
id container=[KVCArrayContainer new];
|
||||
|
||||
id array=[container mutableArrayValueForKey:@"contents"];
|
||||
|
||||
[array addObject:@"SomeObject"];
|
||||
[array insertObject:@"Stuff" atIndex:0];
|
||||
[array removeObject:@"SomeObject"];
|
||||
|
||||
|
||||
[container release];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation KVCArrayContainer
|
||||
|
||||
-(void)_setContents:(id)contents
|
||||
{
|
||||
if(_contents!=contents)
|
||||
{
|
||||
[_contents release];
|
||||
_contents=[contents retain];
|
||||
}
|
||||
}
|
||||
|
||||
-(id)contents
|
||||
{
|
||||
return _contents;
|
||||
}
|
||||
|
||||
-(id)init
|
||||
{
|
||||
if(self=[super init])
|
||||
{
|
||||
_contents=[NSMutableArray new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
[_contents release];
|
||||
[super dealloc];
|
||||
}
|
||||
@end
|
17
testing/UnitTests/SizeAndAlignment.h
Normal file
17
testing/UnitTests/SizeAndAlignment.h
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// SizeAndAlignment.h
|
||||
// UnitTests
|
||||
//
|
||||
// Created by Johannes Fortmann on 20.04.08.
|
||||
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
|
||||
@interface SizeAndAlignment : SenTestCase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
35
testing/UnitTests/SizeAndAlignment.m
Normal file
35
testing/UnitTests/SizeAndAlignment.m
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// SizeAndAlignment.m
|
||||
// UnitTests
|
||||
//
|
||||
// Created by Johannes Fortmann on 20.04.08.
|
||||
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SizeAndAlignment.h"
|
||||
#import "Forwarding.h"
|
||||
|
||||
#define TEST_TYPE(type) { size_t size, alignment;\
|
||||
NSGetSizeAndAlignment(@encode(type), &size, &alignment);\
|
||||
STAssertEquals(size, sizeof(type), @"size of type %i != %i", size, sizeof(type));\
|
||||
STAssertEquals(alignment, __alignof__(type), @"alignment of type %i != %i", alignment, __alignof__(type)); }
|
||||
|
||||
|
||||
@implementation SizeAndAlignment
|
||||
-(void)testPrimitives
|
||||
{
|
||||
TEST_TYPE(float);
|
||||
TEST_TYPE(int);
|
||||
TEST_TYPE(char);
|
||||
TEST_TYPE(void*);
|
||||
TEST_TYPE(SEL);
|
||||
TEST_TYPE(id);
|
||||
|
||||
}
|
||||
|
||||
-(void)testComposites
|
||||
{
|
||||
TEST_TYPE(TestingStruct);
|
||||
|
||||
}
|
||||
@end
|
@ -8,20 +8,44 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
C813609D0DC4A5D800EAFF07 /* Forwarding.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B86D90DBA0305000A8500 /* Forwarding.m */; };
|
||||
C827EA570DB62A9200360D99 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C827EA560DB62A9200360D99 /* SenTestingKit.framework */; };
|
||||
C827EA770DB630DC00360D99 /* KVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C802800DB51FEF0089C0D7 /* KVC.m */; };
|
||||
C827EB3B0DB63FFA00360D99 /* Properties.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EB3A0DB63FFA00360D99 /* Properties.m */; };
|
||||
C827EB3C0DB63FFA00360D99 /* Properties.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EB3A0DB63FFA00360D99 /* Properties.m */; };
|
||||
C827EB850DB643C400360D99 /* KVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C802800DB51FEF0089C0D7 /* KVC.m */; };
|
||||
C827EC6A0DB6661400360D99 /* NewStyleExceptions.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EC690DB6661400360D99 /* NewStyleExceptions.m */; };
|
||||
C827EC6B0DB6661400360D99 /* NewStyleExceptions.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EC690DB6661400360D99 /* NewStyleExceptions.m */; };
|
||||
C84DA1BE0DB8D896000CD913 /* README in Resources */ = {isa = PBXBuildFile; fileRef = C84DA1BD0DB8D896000CD913 /* README */; };
|
||||
C84DA1BF0DB8D896000CD913 /* README in Resources */ = {isa = PBXBuildFile; fileRef = C84DA1BD0DB8D896000CD913 /* README */; };
|
||||
C850BE140DBAA27C005F1047 /* KVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C802800DB51FEF0089C0D7 /* KVC.m */; };
|
||||
C850BE150DBAA27D005F1047 /* KVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C802800DB51FEF0089C0D7 /* KVC.m */; };
|
||||
C85D1F800DBBBAD7005A5FD6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
C85D1F810DBBBAD7005A5FD6 /* README in Resources */ = {isa = PBXBuildFile; fileRef = C84DA1BD0DB8D896000CD913 /* README */; };
|
||||
C85D1F830DBBBAD7005A5FD6 /* Properties.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EB3A0DB63FFA00360D99 /* Properties.m */; };
|
||||
C85D1F840DBBBAD7005A5FD6 /* NewStyleExceptions.m in Sources */ = {isa = PBXBuildFile; fileRef = C827EC690DB6661400360D99 /* NewStyleExceptions.m */; };
|
||||
C85D1F850DBBBAD7005A5FD6 /* ForEach.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B859B0DB90282000A8500 /* ForEach.m */; };
|
||||
C85D1F860DBBBAD7005A5FD6 /* Forwarding.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B86D90DBA0305000A8500 /* Forwarding.m */; };
|
||||
C85D1F870DBBBAD7005A5FD6 /* KVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C802800DB51FEF0089C0D7 /* KVC.m */; };
|
||||
C85D1F880DBBBAD7005A5FD6 /* SizeAndAlignment.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C031A30DBB4F7D00558D7B /* SizeAndAlignment.m */; };
|
||||
C85D1F8B0DBBBAD7005A5FD6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089C1672FE841209C02AAC07 /* Foundation.framework */; };
|
||||
C85D1F8C0DBBBAD7005A5FD6 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C827EA560DB62A9200360D99 /* SenTestingKit.framework */; };
|
||||
C88B859C0DB90282000A8500 /* ForEach.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B859B0DB90282000A8500 /* ForEach.m */; };
|
||||
C88B859D0DB90282000A8500 /* ForEach.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B859B0DB90282000A8500 /* ForEach.m */; };
|
||||
C88B86DB0DBA0305000A8500 /* Forwarding.m in Sources */ = {isa = PBXBuildFile; fileRef = C88B86D90DBA0305000A8500 /* Forwarding.m */; };
|
||||
C8C031A40DBB4F7D00558D7B /* SizeAndAlignment.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C031A30DBB4F7D00558D7B /* SizeAndAlignment.m */; };
|
||||
C8C031A50DBB4F7E00558D7B /* SizeAndAlignment.m in Sources */ = {isa = PBXBuildFile; fileRef = C8C031A30DBB4F7D00558D7B /* SizeAndAlignment.m */; };
|
||||
C8C8030F0DB52A010089C0D7 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089C167FFE841241C02AAC07 /* AppKit.framework */; };
|
||||
C8C803100DB52A010089C0D7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089C1672FE841209C02AAC07 /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
C85D1F8E0DBBBAD7005A5FD6 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.linux.i386.gcc.4.3.0;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
C8C8027E0DB51FE60089C0D7 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
@ -47,6 +71,13 @@
|
||||
C827EC690DB6661400360D99 /* NewStyleExceptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewStyleExceptions.m; sourceTree = "<group>"; };
|
||||
C84D62830DB61BEB000E722B /* local_server_config.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = local_server_config.sh; sourceTree = "<group>"; };
|
||||
C84DA1BD0DB8D896000CD913 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
|
||||
C85D1F910DBBBAD7005A5FD6 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C88B859A0DB90282000A8500 /* ForEach.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForEach.h; sourceTree = "<group>"; };
|
||||
C88B859B0DB90282000A8500 /* ForEach.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForEach.m; sourceTree = "<group>"; };
|
||||
C88B86D80DBA0305000A8500 /* Forwarding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Forwarding.h; sourceTree = "<group>"; };
|
||||
C88B86D90DBA0305000A8500 /* Forwarding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Forwarding.m; sourceTree = "<group>"; };
|
||||
C8C031A20DBB4F7D00558D7B /* SizeAndAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SizeAndAlignment.h; sourceTree = "<group>"; };
|
||||
C8C031A30DBB4F7D00558D7B /* SizeAndAlignment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SizeAndAlignment.m; sourceTree = "<group>"; };
|
||||
C8C8027F0DB51FEF0089C0D7 /* KVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KVC.h; sourceTree = "<group>"; };
|
||||
C8C802800DB51FEF0089C0D7 /* KVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KVC.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -69,6 +100,15 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C85D1F890DBBBAD7005A5FD6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C85D1F8B0DBBBAD7005A5FD6 /* Foundation.framework in Frameworks */,
|
||||
C85D1F8C0DBBBAD7005A5FD6 /* SenTestingKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@ -112,6 +152,12 @@
|
||||
C827EB3A0DB63FFA00360D99 /* Properties.m */,
|
||||
C827EC680DB6661400360D99 /* NewStyleExceptions.h */,
|
||||
C827EC690DB6661400360D99 /* NewStyleExceptions.m */,
|
||||
C88B859A0DB90282000A8500 /* ForEach.h */,
|
||||
C88B859B0DB90282000A8500 /* ForEach.m */,
|
||||
C88B86D80DBA0305000A8500 /* Forwarding.h */,
|
||||
C88B86D90DBA0305000A8500 /* Forwarding.m */,
|
||||
C8C031A20DBB4F7D00558D7B /* SizeAndAlignment.h */,
|
||||
C8C031A30DBB4F7D00558D7B /* SizeAndAlignment.m */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
@ -138,6 +184,7 @@
|
||||
children = (
|
||||
8D5B49B6048680CD000E48DA /* UnitTests.octest */,
|
||||
C827EA6F0DB630BB00360D99 /* UnitTests.octest */,
|
||||
C85D1F910DBBBAD7005A5FD6 /* UnitTests.octest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@ -192,6 +239,26 @@
|
||||
productReference = C827EA6F0DB630BB00360D99 /* UnitTests.octest */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
C85D1F7E0DBBBAD7005A5FD6 /* UnitTests-i386-Linux */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C85D1F8F0DBBBAD7005A5FD6 /* Build configuration list for PBXNativeTarget "UnitTests-i386-Linux" */;
|
||||
buildPhases = (
|
||||
C85D1F7F0DBBBAD7005A5FD6 /* Resources */,
|
||||
C85D1F820DBBBAD7005A5FD6 /* Sources */,
|
||||
C85D1F890DBBBAD7005A5FD6 /* Frameworks */,
|
||||
C85D1F8D0DBBBAD7005A5FD6 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
C85D1F8E0DBBBAD7005A5FD6 /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "UnitTests-i386-Linux";
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = UnitTests;
|
||||
productReference = C85D1F910DBBBAD7005A5FD6 /* UnitTests.octest */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@ -204,6 +271,7 @@
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C85D1F7E0DBBBAD7005A5FD6 /* UnitTests-i386-Linux */,
|
||||
8D5B49AC048680CD000E48DA /* UnitTests-i386-Windows */,
|
||||
C827EA6E0DB630BB00360D99 /* UnitTests */,
|
||||
);
|
||||
@ -228,6 +296,15 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C85D1F7F0DBBBAD7005A5FD6 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C85D1F800DBBBAD7005A5FD6 /* InfoPlist.strings in Resources */,
|
||||
C85D1F810DBBBAD7005A5FD6 /* README in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
@ -244,6 +321,19 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
|
||||
};
|
||||
C85D1F8D0DBBBAD7005A5FD6 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir $TARGET_BUILD_DIR/TestHarness\n\nif [ -f $SOURCE_ROOT/local_server_config.sh ];then\n\t. $SOURCE_ROOT/local_server_config.sh\nfi\n\nif [ \"\"$TESTING_LINK_FILES\"\" = \"YES\" ];then\n\t/Developer/Cocotron/1.0/bin/retargetBundle -link -framework Foundation -framework SenTestingKit -destination $TARGET_BUILD_DIR/TestHarness\n\tln -s /Developer/Cocotron/1.0/Linux/i386/otest $TARGET_BUILD_DIR/TestHarness/otest\nelse\n\t/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework SenTestingKit -destination $TARGET_BUILD_DIR/TestHarness\n\tcp /Developer/Cocotron/1.0/Linux/i386/otest.exe $TARGET_BUILD_DIR/TestHarness/otest\nfi\n\nif [ \"\"$TESTING_SERVER\"\" = \"\" ];then\n\techo \"error: TESTING_SERVER not set; create a local_server_config.sh in source directory\"\n\texit 1\nfi\n\nif [ \"\"$TESTING_DIR\"\" = \"\" ];then\n\techo \"error: TESTING_DIR not set; create a local_server_config.sh in source directory\"\n\texit 1\nfi\n\necho \"#!/bin/sh\" > $TARGET_BUILD_DIR/TestHarness/run_tests.sh\necho \"cd $TESTING_DIR/TestHarness\" >> $TARGET_BUILD_DIR/TestHarness/run_tests.sh\necho \"export LD_LIBRARY_PATH=\\\"\\$LD_LIBRARY_PATH:$TESTING_DIR/TestHarness\\\"\" >> $TARGET_BUILD_DIR/TestHarness/run_tests.sh\necho \"./otest -SenTest All ../$WRAPPER_NAME\" >> $TARGET_BUILD_DIR/TestHarness/run_tests.sh\n\nssh $TESTING_SERVER -- sh $TESTING_DIR/TestHarness/run_tests.sh ";
|
||||
};
|
||||
C8C803EA0DB53B5C0089C0D7 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -264,9 +354,12 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C827EB850DB643C400360D99 /* KVC.m in Sources */,
|
||||
C827EB3C0DB63FFA00360D99 /* Properties.m in Sources */,
|
||||
C827EC6B0DB6661400360D99 /* NewStyleExceptions.m in Sources */,
|
||||
C88B859C0DB90282000A8500 /* ForEach.m in Sources */,
|
||||
C850BE140DBAA27C005F1047 /* KVC.m in Sources */,
|
||||
C8C031A40DBB4F7D00558D7B /* SizeAndAlignment.m in Sources */,
|
||||
C813609D0DC4A5D800EAFF07 /* Forwarding.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -274,9 +367,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C827EA770DB630DC00360D99 /* KVC.m in Sources */,
|
||||
C827EB3B0DB63FFA00360D99 /* Properties.m in Sources */,
|
||||
C827EC6A0DB6661400360D99 /* NewStyleExceptions.m in Sources */,
|
||||
C88B859D0DB90282000A8500 /* ForEach.m in Sources */,
|
||||
C88B86DB0DBA0305000A8500 /* Forwarding.m in Sources */,
|
||||
C850BE150DBAA27D005F1047 /* KVC.m in Sources */,
|
||||
C8C031A50DBB4F7E00558D7B /* SizeAndAlignment.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C85D1F820DBBBAD7005A5FD6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C85D1F830DBBBAD7005A5FD6 /* Properties.m in Sources */,
|
||||
C85D1F840DBBBAD7005A5FD6 /* NewStyleExceptions.m in Sources */,
|
||||
C85D1F850DBBBAD7005A5FD6 /* ForEach.m in Sources */,
|
||||
C85D1F860DBBBAD7005A5FD6 /* Forwarding.m in Sources */,
|
||||
C85D1F870DBBBAD7005A5FD6 /* KVC.m in Sources */,
|
||||
C85D1F880DBBBAD7005A5FD6 /* SizeAndAlignment.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -299,10 +408,13 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = stabs;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .dll;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = UnitTests_Prefix.pch;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
@ -359,6 +471,30 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C85D1F900DBBBAD7005A5FD6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = stabs;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Linux";
|
||||
EXECUTABLE_SUFFIX = .so;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Linux/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = UnitTests_Prefix.pch;
|
||||
INFOPLIST_FILE = "/Users/jobi/Projekte/cocotron/testing/UnitTests/Info copy.plist";
|
||||
INSTALL_PATH = "$(HOME)/Library/Bundles";
|
||||
MACH_O_TYPE = mh_dylib;
|
||||
OTHER_CFLAGS = "-fgnu89-inline";
|
||||
OTHER_LDFLAGS = "-shared";
|
||||
PRODUCT_NAME = UnitTests;
|
||||
SDKROOT = "";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@ -386,6 +522,14 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C85D1F8F0DBBBAD7005A5FD6 /* Build configuration list for PBXNativeTarget "UnitTests-i386-Linux" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C85D1F900DBBBAD7005A5FD6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user