added some todos & organize input files

This commit is contained in:
jem 2019-05-17 12:33:57 +02:00
parent b6267de995
commit 0dd940f820
4 changed files with 7 additions and 3 deletions

View file

@ -31,7 +31,11 @@
(defmacro defdatatest [name & body] (defmacro defdatatest [name & body]
`(do `(do
(ct/deftest ~name (ct/deftest ~name
(let [testdata (sut/read-data (io/resource "should-test-with-data-macro-version.edn")) ;TODO-1: bring macro to work
;TODO-2: crate filename out of package/namespace/test-name.edn
;TODO-3: enable more than one test-data-set with optional infix .##
(let [testdata (sut/read-data
(io/resource "data_test_test/should-test-with-data-macro-version.edn"))
{:keys [input expectation]} testdata] {:keys [input expectation]} testdata]
~body)))) ~body))))

View file

@ -27,7 +27,7 @@
) )
(deftest should-test-with-data-explicit-version (deftest should-test-with-data-explicit-version
(let [testdata (sut/read-data (io/resource "should-test-with-data-explicit-version.edn")) (let [testdata (sut/read-data (io/resource "data_test_test/should-test-with-data-explicit-version.edn"))
{:keys [input expectation]} testdata] {:keys [input expectation]} testdata]
(is (= expectation (is (= expectation
input)))) input))))