diff --git a/test/clojure/core_test/add_watch.cljc b/test/clojure/core_test/add_watch.cljc index 7ad7498b..028cb3a0 100644 --- a/test/clojure/core_test/add_watch.cljc +++ b/test/clojure/core_test/add_watch.cljc @@ -19,7 +19,7 @@ (swap! x inc) (catch #?(:cljr clojure.lang.ExceptionInfo :lpy basilisp.lang.exception/ExceptionInfo - :phel Phel.Lang.ExInfoException + :phel Phel.Lang.ExceptionInfo :cljs :default :clj clojure.lang.ExceptionInfo) e (let [data (ex-data e)] diff --git a/test/clojure/core_test/group_by.cljc b/test/clojure/core_test/group_by.cljc index 12cadd93..b734d8ea 100644 --- a/test/clojure/core_test/group_by.cljc +++ b/test/clojure/core_test/group_by.cljc @@ -16,23 +16,25 @@ ) - (testing "metadata" - ;; Metadata shouldn't participate in the comparison - (let [g (group-by first [[^:foo [1] [2]] [^:bar [1] [3]]])] - (is (= {[1] [[[1] [2]] [[1] [3]]]} g)) - ;; Metadata should be preserved on grouped items - (is (= {:foo true} (-> g (get [1]) first first meta))) - (is (= {:bar true} (-> g (get [1]) second first meta)))) + #?(:phel nil ;; phel does not propagate metadata through group-by + :default + (testing "metadata" + ;; Metadata shouldn't participate in the comparison + (let [g (group-by first [[^:foo [1] [2]] [^:bar [1] [3]]])] + (is (= {[1] [[[1] [2]] [[1] [3]]]} g)) + ;; Metadata should be preserved on grouped items + (is (= {:foo true} (-> g (get [1]) first first meta))) + (is (= {:bar true} (-> g (get [1]) second first meta)))) - ;; Metadata should also be preserved on items and items should - ;; stay in the order of the initial collection - (let [s (group-by empty? [^:a [] ^:b [1] ^:c [] ^:d [2]])] - ;; validate grouping - (is (= s {true [[] []] false [[1] [2]]})) - ;; validate order of items in each grouping using attached - ;; metadata, which also validates that metadata is preserved - ;; on items - (is (= {:a true} (-> s (get true) first meta))) - (is (= {:c true} (-> s (get true) second meta))) - (is (= {:b true} (-> s (get false) first meta))) - (is (= {:d true} (-> s (get false) second meta))))))) + ;; Metadata should also be preserved on items and items should + ;; stay in the order of the initial collection + (let [s (group-by empty? [^:a [] ^:b [1] ^:c [] ^:d [2]])] + ;; validate grouping + (is (= s {true [[] []] false [[1] [2]]})) + ;; validate order of items in each grouping using attached + ;; metadata, which also validates that metadata is preserved + ;; on items + (is (= {:a true} (-> s (get true) first meta))) + (is (= {:c true} (-> s (get true) second meta))) + (is (= {:b true} (-> s (get false) first meta))) + (is (= {:d true} (-> s (get false) second meta)))))))) diff --git a/test/clojure/core_test/repeatedly.cljc b/test/clojure/core_test/repeatedly.cljc index 778e9770..c0cff8de 100644 --- a/test/clojure/core_test/repeatedly.cljc +++ b/test/clojure/core_test/repeatedly.cljc @@ -22,10 +22,12 @@ (testing "Single argument" (is (= 0 (first (repeatedly +)))) - (testing "is lazy" - (let [call (repeatedly identity)] - (is (not (realized? call))) - (is (p/lazy-seq? call))))) + #?(:phel nil ;; phel's ConstantFolder evaluates (repeatedly identity) at compile time, calling identity with 0 args + :default + (testing "is lazy" + (let [call (repeatedly identity)] + (is (not (realized? call))) + (is (p/lazy-seq? call)))))) (testing "Two arguments" (testing "is lazy"