Skip to content

Commit

Permalink
ObjectiveChipmunk fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
slembcke committed Oct 28, 2015
1 parent fb0a61c commit e0d8cad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions objectivec/include/ObjectiveChipmunk/ObjectiveChipmunk.h
Expand Up @@ -32,6 +32,7 @@
#endif

#import "chipmunk/chipmunk.h"
#import "chipmunk/chipmunk_structs.h"

/**
Allows you to add composite objects to a space in a single method call.
Expand Down
1 change: 1 addition & 0 deletions objectivec/src/ChipmunkSpace.m
Expand Up @@ -20,6 +20,7 @@
*/

#import "ObjectiveChipmunk/ObjectiveChipmunk.h"
#import "chipmunk/chipmunk_private.h"
#import "chipmunk/cpHastySpace.h"

#import <objc/message.h>
Expand Down
1 change: 1 addition & 0 deletions xcode/ObjectiveChipmunkTests/MemoryTest.m
Expand Up @@ -22,6 +22,7 @@
#import <XCTest/XCTest.h>

#import "ObjectiveChipmunk/ObjectiveChipmunk.h"
#import "chipmunk/chipmunk_private.h"

#define AssertRetainCount(obj, count) XCTAssertEqual([obj retainCount], (NSUInteger)count, @"")

Expand Down
6 changes: 3 additions & 3 deletions xcode/ObjectiveChipmunkTests/SpaceTest.m
Expand Up @@ -99,7 +99,7 @@ -(void)testProperties {
XCTAssertEqualObjects(set, ([NSSet setWithObjects:segment, nil]), @"");

set = pointQueryInfoToShapes([space pointQueryAll:cpv(-1,-1) maxDistance:0.0 filter:CP_SHAPE_FILTER_ALL]);
XCTAssertEqualObjects(set, ([NSSet setWithObjects:nil]), @"");
XCTAssertEqualObjects(set, ([NSSet set]), @"");

cpSpacePointQuery_b(space.space, cpv(-0.6, -0.6), 0.0, CP_SHAPE_FILTER_ALL, ^(cpShape *shape, cpVect p, cpFloat d, cpVect g){
XCTAssertEqual(shape, segment.shape, @"");
Expand Down Expand Up @@ -129,7 +129,7 @@ -(void)testProperties {
XCTAssertEqualObjects(set, ([NSSet setWithObjects:circle, segment, box, nil]), @"");

set = segmentQueryInfoToShapes([space segmentQueryAllFrom:cpv(2,2) to:cpv(3,3) radius:0.0 filter:CP_SHAPE_FILTER_ALL]);
XCTAssertEqualObjects(set, ([NSSet setWithObjects:nil]), @"");
XCTAssertEqualObjects(set, ([NSSet set]), @"");

ChipmunkSegmentQueryInfo *segmentInfo = nil;
segmentInfo = [space segmentQueryFirstFrom:cpv(-2,-2) to:cpv(1,1) radius:0.0 filter:CP_SHAPE_FILTER_ALL];
Expand Down Expand Up @@ -191,7 +191,7 @@ -(void)testProperties {

queryBody.position = cpv(4,4);
set = shapeQueryInfoToShapes([space shapeQueryAll:queryShape]);
XCTAssertEqualObjects(set, ([NSSet setWithObjects:nil]), @"");
XCTAssertEqualObjects(set, ([NSSet set]), @"");

[space remove:circle];
[space remove:segment];
Expand Down

0 comments on commit e0d8cad

Please sign in to comment.