Skip to content

Commit

Permalink
CameraTests: Remove whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSundell committed Dec 3, 2017
1 parent 1ea0045 commit bf7f367
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/ImagineEngineTests/CameraTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ final class CameraTests: XCTestCase {
scene.camera.position = Point(x: -2000, y: -1000)
XCTAssertEqual(scene.camera.position, Point(x: -2000, y: -1000))
}

func testResizeEventTrigger() {
let scene = Scene(size: Size(width: 500, height: 300))
var resizeTriggerCount = 0
scene.camera.events.resized.observe { resizeTriggerCount += 1 }

XCTAssertEqual(resizeTriggerCount, 0)

// Set view frame and add scene to game thus resizing the camera
game.view.frame.size = Size(width: 250, height: 150)
game.scene = scene

XCTAssertEqual(resizeTriggerCount, 1)

// Set view frame back to original size to ensure the resize event is untriggered
game.view.frame.size = Size(width: 250, height: 150)
XCTAssertEqual(resizeTriggerCount, 1)
Expand Down

0 comments on commit bf7f367

Please # to comment.