Expected list of qualifiers before "CGPoint"

My project compiles and works fine, if I do not try to compile my Unit Test Bundle, it will run the following: The expected list of qualifiers before the CGPoint error on line 5

#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

I made sure that my Unit Test Bundle is an object of my WorldObject.m , and its title is imported into my test title:

#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
+3
source share
1 answer

You need to import the header <UIKit/UIKit.h>instead <Foundation/Foundation.h>of your file (the top file in your question).

+9
source

Source: https://habr.com/ru/post/1746395/


All Articles