You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
534 B
21 lines
534 B
(ns cipher-analytical-machine.parsers.gamma-test
|
|
(:require
|
|
[clojure.test :refer :all]
|
|
[cipher-analytical-machine.parsers.gamma :refer :all]))
|
|
|
|
(deftest key?-test
|
|
(testing "The function return true only if the key in the format '%d,%d,%d'."
|
|
(are [str expected]
|
|
(= expected
|
|
(key? str))
|
|
"9" false
|
|
"9,10" false
|
|
"10,9,8" true
|
|
"-10,9,-8" true
|
|
"-10,-9,-8" true
|
|
"asd 10 " false
|
|
" 10 " false
|
|
"-10" false
|
|
"abc" false)))
|
|
|