3
我的項目編譯並運行正常,除非我嘗試編譯我的單元測試包,它會在下面用'預期說明符 - 限定符列表'CGPoint'「第5行錯誤:'CGPoint'前的預期說明符 - 限定符列表
#import <Foundation/Foundation.h>
#import "Force.h"
@interface WorldObject : NSObject {
CGPoint coordinates;
float altitude;
NSMutableDictionary *forces;
}
@property (nonatomic) CGPoint coordinates;
@property (nonatomic) float altitude;
@property (nonatomic,retain) NSMutableDictionary *forces;
- (void)setObject:(id)anObject inForcesForKey:(id)aKey;
- (void)removeObjectFromForcesForKey:(id)aKey;
- (id)objectFromForcesForKey:(id)aKey;
- (void)applyForces;
@end
我已經確信,我的單元測試套件是我WorldObject.m的目標和它的頭在我的測試頭輸入:
#define USE_APPLICATION_UNIT_TEST 1
#import <SenTestingKit/SenTestingKit.h>
#import <UIKit/UIKit.h>
#import "Force.h"
#import "WorldObject.h"
@interface LogicTests : SenTestCase {
Force *myForce;
WorldObject *myWorldObject;
}
@end
或'' –
kennytm
2010-05-20 14:53:54
我看到現在發生了什麼。它在我編譯我的應用程序時起作用,因爲UIKit是在我的視圖控制器中導入的,但不是當它在我的單元測試包中獨立時。 謝謝! – Rob 2010-05-20 14:55:23