|
| 1 | +pangram.isPangram.tests.ex1 = |
| 2 | + expect (false == isPangram "") |
| 3 | + |> Test.label "empty sentence" |
| 4 | + |
| 5 | +pangram.isPangram.tests.ex2 = |
| 6 | + expect (true == isPangram "abcdefghijklmnopqrstuvwxyz") |
| 7 | + |> Test.label "perfect lower case" |
| 8 | + |
| 9 | +pangram.isPangram.tests.ex3 = |
| 10 | + expect (true == isPangram "the quick brown fox jumps over the lazy dog") |
| 11 | + |> Test.label "only lower case" |
| 12 | + |
| 13 | +pangram.isPangram.tests.ex4 = |
| 14 | + expect (false == isPangram "a quick movement of the enemy will jeopardize five gunboats") |
| 15 | + |> Test.label "missing the letter 'x'" |
| 16 | + |
| 17 | +pangram.isPangram.tests.ex5 = |
| 18 | + expect (false == isPangram "five boxing wizards jump quickly at it") |
| 19 | + |> Test.label "missing the letter 'h'" |
| 20 | + |
| 21 | +pangram.isPangram.tests.ex6 = |
| 22 | + expect (true == isPangram "the_quick_brown_fox_jumps_over_the_lazy_dog") |
| 23 | + |> Test.label "with underscores" |
| 24 | + |
| 25 | +pangram.isPangram.tests.ex7 = |
| 26 | + expect (true == isPangram "the 1 quick brown fox jumps over the 2 lazy dogs") |
| 27 | + |> Test.label "with numbers" |
| 28 | + |
| 29 | +pangram.isPangram.tests.ex8 = |
| 30 | + expect (false == isPangram "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog") |
| 31 | + |> Test.label "missing letters replaced by numbers" |
| 32 | + |
| 33 | +pangram.isPangram.tests.ex9 = |
| 34 | + expect (true == isPangram "\"Five quacking Zephyrs jolt my wax bed.\"") |
| 35 | + |> Test.label "mixed case and punctuation" |
| 36 | + |
| 37 | +pangram.isPangram.tests.ex10 = |
| 38 | + expect (false == isPangram "abcdefghijklm ABCDEFGHIJKLM") |
| 39 | + |> Test.label "a-m and A-M are 26 different characters but not a pangram" |
| 40 | + |
| 41 | +test> pangram.tests = runAll [ |
| 42 | + pangram.isPangram.tests.ex1, |
| 43 | + pangram.isPangram.tests.ex2, |
| 44 | + pangram.isPangram.tests.ex3, |
| 45 | + pangram.isPangram.tests.ex4, |
| 46 | + pangram.isPangram.tests.ex5, |
| 47 | + pangram.isPangram.tests.ex6, |
| 48 | + pangram.isPangram.tests.ex7, |
| 49 | + pangram.isPangram.tests.ex8, |
| 50 | + pangram.isPangram.tests.ex9, |
| 51 | + pangram.isPangram.tests.ex10 |
| 52 | +] |
0 commit comments