Skip to content

Commit

Permalink
empty string case: add empty strings inside the vectors for uniformity
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Jan 24, 2025
1 parent 145f8f9 commit 40b8356
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions exercises/practice/transpose/.meta/generator.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(ns transpose-generator)

(defn update-test-case [test-case]
(if (= "empty string" (:description test-case))
(-> test-case
(update-in [:input :lines] #(conj % ""))
(update :expected #(conj % "")))
test-case))
4 changes: 2 additions & 2 deletions exercises/practice/transpose/test/transpose_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

(deftest transpose_test_1
(testing "empty string"
(is (= (str/join "\n" [])
(is (= (str/join "\n" [""])
(transpose/transpose
(str/join "\n" []))))))
(str/join "\n" [""]))))))

(deftest transpose_test_2
(testing "two characters in a row"
Expand Down

0 comments on commit 40b8356

Please sign in to comment.