Sha256: 540d77ee21193c7bd5820b3db9b42282df63e586f083e459b279eabb63ca8530

Contents?: true

Size: 822 Bytes

Versions: 37

Compression:

Stored size: 822 Bytes

Contents

#if swift(>=3.0)
    import XCTest
#endif

class HelloWorldTest: XCTestCase {

    func testNoName() {
        let expected = "Hello, World!"
        XCTAssertEqual(HelloWorld.hello(), expected, "When given no name, we should greet the world!")
    }

    func testSampleName() {
        let expected = "Hello, Alice!"
        XCTAssertEqual(HelloWorld.hello("Alice"), expected, "When given 'Alice' we should greet Alice!")
    }

    func testOtherSampleName() {
        let expected = "Hello, Bob!"
        XCTAssertEqual(HelloWorld.hello("Bob"), expected, "When given 'Bob' we should greet Bob!")
    }

    func testNoStrangeName() {
        let expected = "Hello, !"
        XCTAssertEqual(HelloWorld.hello(""), expected, "When given an empty string, it is strange, but should have a space and punctuation")
    }

}

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
trackler-2.0.6.15 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.14 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.13 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.12 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.11 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.10 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.9 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.8 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.7 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.6 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.5 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.4 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.3 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.2 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.1 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.6.0 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.5.18 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.5.17 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.5.16 tracks/swift/exercises/hello-world/helloWorldTest.swift
trackler-2.0.5.15 tracks/swift/exercises/hello-world/helloWorldTest.swift