Skip to content

Commit 407aa71

Browse files
committed
Fix test assertions for native: stringify inside eval
1 parent 7a71292 commit 407aa71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sci/defrecords_and_deftype_test.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
(testing "defrecord inside non-top-level form"
145145
(is (= {:a 1} (tu/eval* "(let [x 1] (defrecord Foo [a]) (into {} (->Foo 1)))" {})))
146146
(is (= {:a 1} (tu/eval* "(let [x 1] (defrecord Foo [a]) (into {} (map->Foo {:a 1})))" {})))
147-
(is (str/includes? (str (tu/eval* "(let [x 1] (defrecord Foo [a]) (->Foo 1))" {})) "Foo")))
147+
(is (str/includes? (tu/eval* "(let [x 1] (defrecord Foo [a]) (str (->Foo 1)))" {}) "Foo")))
148148
(testing "meta and ext"
149149
(is (true? (tu/eval* "(defrecord Dude [x]) (let [x (new Dude 1 {:meta 1} {:ext 2})]
150150
(and (= 1 (:x x)) (= 1 (:meta (meta x))) (= 2 (:ext x))))" {})))))
@@ -206,7 +206,7 @@
206206
{})))
207207
(testing "deftype inside non-top-level form (issue #1936)"
208208
(is (nil? (tu/eval* "(let [x 1] (deftype MyType [field]) (empty (->MyType \"\")))" {})))
209-
(is (str/includes? (str (tu/eval* "(let [x 1] (deftype MyType [field]) (->MyType \"hello\"))" {}))
209+
(is (str/includes? (tu/eval* "(let [x 1] (deftype MyType [field]) (str (->MyType \"hello\")))" {})
210210
"MyType")))
211211
(testing "getting value of shadowed field"
212212
(is (= 10

0 commit comments

Comments
 (0)