Skip to content

Commit c90a49d

Browse files
committed
Fix tests
1 parent bbcc0be commit c90a49d

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Tests/GameMathTests/3D/Direction3Tests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ final class Direction3Tests: XCTestCase {
7777

7878
func testAngleAroundX() {
7979
XCTAssertEqual(Direction3.right.angleAroundX, 0)
80-
XCTAssertEqual(Direction3.up.angleAroundX, Radians(90°))
80+
XCTAssertEqual(Radians(Direction3.up.angleAroundX), Radians(90°))
8181
}
8282

8383
func testAngleAroundY() {
8484
XCTAssertEqual(Direction3.up.angleAroundY, 0)
85-
XCTAssertEqual(Direction3.right.angleAroundY, Radians(90°))
85+
XCTAssertEqual(Radians(Direction3.right.angleAroundY), Radians(90°))
8686
}
8787

8888
func testAngleAroundZ() {
8989
XCTAssertEqual(Direction3.forward.angleAroundZ, 0)
90-
XCTAssertEqual(Direction3.up.angleAroundZ, Radians(90°))
90+
XCTAssertEqual(Radians(Direction3.up.angleAroundZ), Radians(90°))
9191
}
9292

9393
func testRotated() {

Tests/GameMathTests/3D/Matrix4x4Tests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ final class Matrix4x4Tests: XCTestCase {
120120
func testQuaternion() {
121121
let quat1 = Quaternion(90°, axis: .right)
122122
let quat2 = Matrix4x4(rotation: quat1).rotation
123-
let angle1 = quat1.forward.angle(to: .right).rawValue
124-
let angle2 = quat2.forward.angle(to: .right).rawValue
123+
let angle1 = quat1.forward.angle(to: .right).rawValueAsRadians
124+
let angle2 = quat2.forward.angle(to: .right).rawValueAsRadians
125125
XCTAssertEqual(angle1, angle2, accuracy: 0.0025)
126126
}
127127

Tests/GateEngineTests/_GateEngineXCTestCase.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ open class GateEngineXCTestCase: XCTestCase {
5151
guard Game._shared == nil else { return }
5252

5353
let delegate = TestGameDelegate()
54-
let platform = CurrentPlatform(delegate: delegate)
55-
Game._shared = Game(delegate: delegate, currentPlatform: platform)
54+
Game._shared = Game(delegate: delegate)
5655

5756
await Game.shared.didFinishLaunching()
5857

Tests/GravityTests/_GravityXCTestCase.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ import XCTest
1010
@testable import GateEngine
1111
@testable import Gravity
1212

13-
@MainActor
1413
open class GravityXCTestCase: XCTestCase {
14+
// This test simply makes this class have a test that passes so Xcode marks the test as completed
15+
// Without this Xcode marks the test ambiguous
16+
func testNothing() {
17+
XCTAssert(true)
18+
}
19+
1520
func runGravity(at path: String) async {
1621
let gravity = Gravity()
1722

@@ -76,8 +81,7 @@ open class GravityXCTestCase: XCTestCase {
7681
guard Game._shared == nil else { return }
7782

7883
let delegate = TestGameDelegate()
79-
let platform = CurrentPlatform(delegate: delegate)
80-
Game._shared = Game(delegate: delegate, currentPlatform: platform)
84+
Game._shared = Game(delegate: delegate)
8185

8286
await Game.shared.didFinishLaunching()
8387

0 commit comments

Comments
 (0)