Sha256: 1b7acf621eaebec60262b60877ce415057c014f7dd49284f42c7be58dc6b3b79

Contents?: true

Size: 1.76 KB

Versions: 325

Compression:

Stored size: 1.76 KB

Contents

import XCTest
@testable import Isogram

class IsogramTests: XCTestCase {

    func testEmptyString() {
        XCTAssertTrue(Isogram.isIsogram(""))
    }

    func testIsogramWithOnlyLowerCaseCharacters() {
        XCTAssertTrue(Isogram.isIsogram("isogram"))
    }

    func testWordWithOneDuplicatedCharacter() {
        XCTAssertFalse(Isogram.isIsogram("eleven"))
    }

    func testLongestReportedEnglishIsogram() {
        XCTAssertTrue(Isogram.isIsogram("subdermatoglyphic"))
    }

    func testWordWithDuplicatedCharacterInMixedCase() {
        XCTAssertFalse(Isogram.isIsogram("Alphabet"))
    }

    func testHypotheticalIsogrammicWordWithHyphen() {
        XCTAssertTrue(Isogram.isIsogram("thumbscrew-japingly"))
    }

    func testIsogramWithDuplicatedNonLetterCharacter() {
        XCTAssertTrue(Isogram.isIsogram("Hjelmqvist-Gryb-Zock-Pfund-Wax"))
    }

    func testMadeUpNameThatIsAnIsogram() {
        XCTAssertTrue(Isogram.isIsogram("Emily Jung Schwartzkopf"))
    }

    static var allTests: [(String, (IsogramTests) -> () throws -> Void)] {
        return [
            ("testEmptyString", testEmptyString),
            ("testIsogramWithOnlyLowerCaseCharacters", testIsogramWithOnlyLowerCaseCharacters),
            ("testWordWithOneDuplicatedCharacter", testWordWithOneDuplicatedCharacter),
            ("testLongestReportedEnglishIsogram", testLongestReportedEnglishIsogram),
            ("testWordWithDuplicatedCharacterInMixedCase", testWordWithDuplicatedCharacterInMixedCase),
            ("testHypotheticalIsogrammicWordWithHyphen", testHypotheticalIsogrammicWordWithHyphen),
            ("testIsogramWithDuplicatedNonLetterCharacter", testIsogramWithDuplicatedNonLetterCharacter),
            ("testMadeUpNameThatIsAnIsogram", testMadeUpNameThatIsAnIsogram),
        ]
    }
}

Version data entries

325 entries across 325 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.138 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.137 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.136 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.135 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.134 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.133 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.132 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.131 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.130 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.129 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.128 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.127 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.126 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.125 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.124 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.123 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.122 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.121 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.120 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift