Created
June 4, 2017 01:44
-
-
Save chriswebb09/6704723c29e71f5f0d24844cc0072279 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
@testable import TestExample | |
class TestExampleTests: XCTestCase { | |
var math: Math! | |
override func setUp() { | |
super.setUp() | |
self.math = Math() | |
} | |
override func tearDown() { | |
super.tearDown() | |
math = nil | |
} | |
func testMathAddition() { | |
XCTAssertEqual(math.addition(intOne: 1, intTwo: 1), 2) | |
var addZeroTry = math.addition(intOne: 0, intTwo: 1) | |
XCTAssertFalse(addZeroTry == 2) | |
} | |
func testMathSubtraction() { | |
XCTAssertEqual(math.subtraction(intOne: 1, intTwo: 1), 0) | |
XCTAssertFalse(math.subtraction(intOne: 1, intTwo: 0) == 0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment