From d0c55f1c0d3044085251f60c78854e25365ae6ea Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 7 Apr 2016 09:08:02 -0400 Subject: Fix GTMGeometry builds on 64 bit OS X where CG and NS struct sizes may differ. Remove GTMCGPointToNSPoint, GTMNSPointToCGPoint, GTMCGRectToNSRect, GTMCGSizeToNSSize Note that Apple's NSGeometry.h sometimes defines NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES so there's some reason to believe the CG and NS structs can compile incompatibly. Fix a typo in GTMSenTestCase.h --- Foundation/GTMGeometryUtilsTest.m | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'Foundation/GTMGeometryUtilsTest.m') diff --git a/Foundation/GTMGeometryUtilsTest.m b/Foundation/GTMGeometryUtilsTest.m index 38b86fb..f765526 100644 --- a/Foundation/GTMGeometryUtilsTest.m +++ b/Foundation/GTMGeometryUtilsTest.m @@ -25,36 +25,12 @@ @implementation GTMGeometryUtilsTest #if !GTM_IPHONE_SDK -- (void)testGTMCGPointToNSPoint { - CGPoint cgPoint = CGPointMake(15.1,6.2); - NSPoint nsPoint = GTMCGPointToNSPoint(cgPoint); - STAssertTrue(CGPointEqualToPoint(*(CGPoint*)&nsPoint, cgPoint), nil); -} - -- (void)testGTMNSPointToCGPoint { - NSPoint nsPoint = NSMakePoint(10.2,1.5); - CGPoint cgPoint = GTMNSPointToCGPoint(nsPoint); - STAssertTrue(CGPointEqualToPoint(cgPoint, *(CGPoint*)&nsPoint), nil); -} - -- (void)testGTMCGRectToNSRect { - CGRect cgRect = CGRectMake(1.5,2.4,10.6,11.7); - NSRect nsRect = GTMCGRectToNSRect(cgRect); - STAssertTrue(CGRectEqualToRect(cgRect, *(CGRect*)&nsRect), nil); -} - - (void)testGTMNSRectToCGRect { NSRect nsRect = NSMakeRect(4.6,3.2,22.1,45.0); CGRect cgRect = GTMNSRectToCGRect(nsRect); STAssertTrue(CGRectEqualToRect(cgRect, *(CGRect*)&nsRect), nil); } -- (void)testGTMCGSizeToNSSize { - CGSize cgSize = {5,6}; - NSSize nsSize = GTMCGSizeToNSSize(cgSize); - STAssertTrue(CGSizeEqualToSize(cgSize, *(CGSize*)&nsSize), nil); -} - - (void)testGTMNSSizeToCGSize { NSSize nsSize = {22,15}; CGSize cgSize = GTMNSSizeToCGSize(nsSize); -- cgit v1.2.3