Sha256: 190609da9d72b970e9a404a35316ece4c5c5d34a8922ce33224f7d2e90e72b5a

Contents?: true

Size: 1.29 KB

Versions: 67

Compression:

Stored size: 1.29 KB

Contents

import org.junit.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue

class PangramTest {

    @Test
    fun emptySentence() {
        assertFalse(Pangrams.isPangram(""))
    }

    @Test
    fun lowercasePangram() {
        assertTrue(Pangrams.isPangram("the quick brown fox jumps over the lazy dog"))
    }

    @Test
    fun missingCharacterX() {
        assertFalse(Pangrams.isPangram("a quick movement of the enemy will jeopardize five gunboats"))
    }

    @Test
    fun anotherMissingCharacterX() {
        assertFalse(Pangrams.isPangram("the quick brown fish jumps over the lazy dog"))
    }

    @Test
    fun withUnderscores() {
        assertTrue(Pangrams.isPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"))
    }

    @Test
    fun withNumbers() {
        assertTrue(Pangrams.isPangram("the 1 quick brown fox jumps over the 2 lazy dogs"))
    }

    @Test
    fun missingLettersReplacedByNumbers() {
        assertFalse(Pangrams.isPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"))
    }

    @Test
    fun mixedCaseAndPunctuation() {
        assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""))
    }

    @Test
    fun nonAsciiCharacters() {
        assertTrue(Pangrams.isPangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."))
    }

}

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
trackler-2.0.6.11 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.10 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.9 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.8 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.7 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.6 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.5 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.4 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.3 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.2 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.1 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.6.0 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.18 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.17 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.16 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.15 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.14 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.13 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.12 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt
trackler-2.0.5.11 tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt