File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 8282
8383(def transforming-parser-schemas
8484 " Schemas with transforming parsers."
85- [[:andn [:any :any ]] [:catn [:any :any ]] [:seqable [:catn [:any :any ]]] [:multi {:dispatch #'any?} [true :any ]]])
85+ [[:andn [:any :any ]]
86+ [:catn [:any :any ]]
87+ [:seqable [:catn [:any :any ]]]
88+ [:multi {:dispatch #'any?} [true :any ]]])
8689
8790(defn ensure-parser-type [expected-simple s]
8891 #? (:bb nil ; ; test.chuck doesn't work in bb
8992 :default (let [s (m/schema s)
9093 parse (m/parser s)
9194 unparse (m/parser s)]
9295 (if expected-simple
93- (doseq [g (is ( doall ( mg/sample s)) )]
96+ (doseq [g (mg/sample s)]
9497 (testing (pr-str g)
9598 (let [p (parse g)]
9699 (is (identical? g p))
126129 (is (= expected-simple (simple-parser? s)))
127130 (ensure-parser-type expected-simple s)))))
128131
132+ ; ;seems to fail cljs
133+ (deftest map-special-case-test
134+ (let [s [:map [:foo :any ] [:bar :int ]]
135+ parse (m/parser s)
136+ unparse (m/unparser s)
137+ g {:foo ##NaN :bar -4 }
138+ p (parse g)]
139+ (is (identical? g p))))
140+
129141(deftest and-complex-parser-test
130142 (is (= {} (m/parse [:and :map [:fn map?]] {})))
131143 (is (= {} (m/parse [:and [:fn map?] :map ] {})))
You can’t perform that action at this time.
0 commit comments