Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to mac catalyst #26

Merged
merged 16 commits into from
Jul 4, 2024
Merged
Prev Previous commit
Next Next commit
Fix failing tests
jamieleecho committed Jul 2, 2024
commit f74edea8c92f1ed9cc4fe301c7cc8cb26a21cf9d
Binary file not shown.
16 changes: 5 additions & 11 deletions Space Bandits/dynosprite tests/src/DSTransitionSceneTest.m
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ - (void)testAddsLabels {
XCTAssertEqual(label.horizontalAlignmentMode, SKLabelHorizontalAlignmentModeLeft);
XCTAssertEqual(label.verticalAlignmentMode, SKLabelVerticalAlignmentModeTop);
XCTAssertTrue(CGPointEqualToPoint(label.position, CGPointMake(0, 0)));
XCTAssertEqual(label.fontSize, 13.037036895751953f);
XCTAssertEqual(label.fontSize, 12);
XCTAssertTrue([DSTestUtils color:label.fontColor isSameAs:_target.foregroundColor]);
SKSpriteNode *background = (SKSpriteNode *)label.parent;
XCTAssertEqualObjects(background.parent, _target);
@@ -156,11 +156,8 @@ - (void)testUpdatingResourceControllerUpdatesDisplay {
XCTAssertTrue([DSTestUtils image:hiresImage isSameAsImage:hiresBackgroundImage]);

// Verify that the font was updated
#if TARGET_OS_MACCATALYST
XCTAssertEqual(label.fontSize, 12.80000114440918);
#else
XCTAssertEqual(label.fontSize, 16);
#endif
XCTAssertEqual(label.fontSize, 12);

SKSpriteNode *background = (SKSpriteNode *)label.parent;
XCTAssert(label.fontName, @"Monaco");
XCTAssertTrue(CGPointEqualToPoint(background.position, CGPointMake(100.0f, -201.19999694824219)));
@@ -190,11 +187,8 @@ - (void)testResourceControllerUpdatingHiresModeUpdatesDisplay {
[_target observeValueForKeyPath:@"hiresMode" ofObject:_resourceController change:nil context:nil];

// Verify that the font was updated
#if TARGET_OS_MACCATALYST
XCTAssertEqual(label.fontSize, 12.80000114440918);
#else
XCTAssertEqual(label.fontSize, 16);
#endif
XCTAssertEqual(label.fontSize, 12);

SKSpriteNode *background = (SKSpriteNode *)label.parent;
XCTAssert(label.fontName, @"Monaco");
XCTAssertTrue(CGPointEqualToPoint(background.position, CGPointMake(100.0f, -201.19999694824219)));