Skip to content

Commit

Permalink
Update exercises/practice/pangram/.meta/generator.tpl
Browse files Browse the repository at this point in the history
Co-authored-by: Anastasios Chatzialexiou <[email protected]>
  • Loading branch information
ErikSchierboom and tasxatzial committed Jan 12, 2025
1 parent cc2e996 commit 0a48b1d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
8 changes: 2 additions & 6 deletions exercises/practice/pangram/.meta/generator.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@
{{#test_cases.isPangram~}}
(deftest pangram?_test_{{idx}}
(testing "{{description}}"
{{#expected~}}
(is (pangram/pangram? "{{input.sentence}}"))))
{{else~}}
(is (false? (pangram/pangram? "{{input.sentence}}")))))
{{/expected}}
{{/test_cases.isPangram}}
(is ({{#expected}}true?{{else}}false?{{/expected}} (pangram/pangram? "{{input.sentence}}")))))
{{/test_cases.isPangram}}
22 changes: 11 additions & 11 deletions exercises/practice/pangram/test/pangram_test.clj
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
(ns pangram-test
(:require [clojure.test :refer [deftest testing is]]
pangram))
pangram))

(deftest pangram?_test_1
(testing "empty sentence"
(is (not (pangram/pangram? "")))))

(deftest pangram?_test_2
(testing "perfect lower case"
(is (pangram/pangram? "abcdefghijklmnopqrstuvwxyz"))))

(deftest pangram?_test_3
(testing "only lower case"
(is (pangram/pangram? "the quick brown fox jumps over the lazy dog"))))

(deftest pangram?_test_4
(testing "missing the letter &#x27;x&#x27;"
(is (not (pangram/pangram? "a quick movement of the enemy will jeopardize five gunboats")))))

(deftest pangram?_test_5
(testing "missing the letter &#x27;h&#x27;"
(is (not (pangram/pangram? "five boxing wizards jump quickly at it")))))

(deftest pangram?_test_6
(testing "with underscores"
(is (pangram/pangram? "the_quick_brown_fox_jumps_over_the_lazy_dog"))))

(deftest pangram?_test_7
(testing "with numbers"
(is (pangram/pangram? "the 1 quick brown fox jumps over the 2 lazy dogs"))))

(deftest pangram?_test_8
(testing "missing letters replaced by numbers"
(is (not (pangram/pangram? "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog")))))

(deftest pangram?_test_9
(testing "mixed case and punctuation"
(is (pangram/pangram? "&quot;Five quacking Zephyrs jolt my wax bed.&quot;"))))

(deftest pangram?_test_10
(testing "case insensitive"
(is (not (pangram/pangram? "the quick brown fox jumps over with lazy FX")))))

(deftest pangram?_test_11
(testing "a-m and A-M are 26 different characters but not a pangram"
(is (not (pangram/pangram? "abcdefghijklm ABCDEFGHIJKLM")))))
Expand Down
1 change: 0 additions & 1 deletion generators/.problem-specifications
Submodule .problem-specifications deleted from 162890

0 comments on commit 0a48b1d

Please sign in to comment.