From bfa20074597db7acc964c3a2ebb668744e6a37f9 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 27 Oct 2023 17:35:15 +0200 Subject: [PATCH] Finish implementing macro * move macros.clj to common directory, to be included in shadow-cljs * add cljs macro-passing file * add tests to check functionality --- src/main/{clj => cljc}/dda/c4k_common/macros.clj | 0 src/main/cljs/dda/c4k_common/macros.cljs | 2 ++ src/test/clj/dda/c4k_common/macros_test.clj | 7 +++++++ src/test/cljs/dda/c4k_common/macros_test.cljs | 7 +++++++ 4 files changed, 16 insertions(+) rename src/main/{clj => cljc}/dda/c4k_common/macros.clj (100%) create mode 100644 src/main/cljs/dda/c4k_common/macros.cljs create mode 100644 src/test/clj/dda/c4k_common/macros_test.clj create mode 100644 src/test/cljs/dda/c4k_common/macros_test.cljs diff --git a/src/main/clj/dda/c4k_common/macros.clj b/src/main/cljc/dda/c4k_common/macros.clj similarity index 100% rename from src/main/clj/dda/c4k_common/macros.clj rename to src/main/cljc/dda/c4k_common/macros.clj diff --git a/src/main/cljs/dda/c4k_common/macros.cljs b/src/main/cljs/dda/c4k_common/macros.cljs new file mode 100644 index 0000000..24babd2 --- /dev/null +++ b/src/main/cljs/dda/c4k_common/macros.cljs @@ -0,0 +1,2 @@ +(ns dda.c4k-common.macros + (:require-macros [dda.c4k-common.macros])) diff --git a/src/test/clj/dda/c4k_common/macros_test.clj b/src/test/clj/dda/c4k_common/macros_test.clj new file mode 100644 index 0000000..db1e0c6 --- /dev/null +++ b/src/test/clj/dda/c4k_common/macros_test.clj @@ -0,0 +1,7 @@ +(ns dda.c4k-common.macros-test + (:require + [clojure.test :refer [deftest is are testing run-tests]] + [dda.c4k-common.macros :refer [inline-resources]])) + +(deftest should-inline-resources + (is (= 3 (count (inline-resources "ingress"))))) \ No newline at end of file diff --git a/src/test/cljs/dda/c4k_common/macros_test.cljs b/src/test/cljs/dda/c4k_common/macros_test.cljs new file mode 100644 index 0000000..48346f8 --- /dev/null +++ b/src/test/cljs/dda/c4k_common/macros_test.cljs @@ -0,0 +1,7 @@ +(ns dda.c4k-common.macros-test + (:require + [cljs.test :refer-macros [deftest is]] + [dda.c4k-common.macros :refer-macros [inline-resources]])) + +(deftest should-inline-resources + (is (= 3 (count (inline-resources "ingress")))))