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.180 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.179 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.178 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.177 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.176 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.175 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.174 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.173 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.172 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.171 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.170 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.169 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.167 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.166 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.165 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.164 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.163 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.162 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.161 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift
trackler-2.2.1.160 tracks/swift/exercises/isogram/Tests/IsogramTests/IsogramTests.swift