File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ specified, return speced vars from all namespaces."
422422 `(let [st# (inst-ms ~start)
423423 et# (inst-ms ~end)
424424 mkdate# (fn [d#] (js/Date. d#))]
425- (spec (and inst? #(inst-in-range? ~start ~end %))
425+ (spec (and inst? #(cljs.spec/ inst-in-range? ~start ~end %))
426426 :gen (fn []
427427 (gen/fmap mkdate#
428428 (gen/large-integer* {:min st# :max et#}))))))
@@ -431,7 +431,7 @@ specified, return speced vars from all namespaces."
431431 " Returns a spec that validates longs in the range from start
432432 (inclusive) to end (exclusive)."
433433 [start end]
434- `(spec (and c/int? #(int-in-range? ~start ~end %))
434+ `(spec (and c/int? #(cljs.spec/ int-in-range? ~start ~end %))
435435 :gen #(gen/large-integer* {:min ~start :max (dec ~end)})))
436436
437437(defmacro instrument
Original file line number Diff line number Diff line change 4343 (is (= " good" (testmm {:type :good })))
4444 (is (thrown? js/Error (testmm " foo" ))))
4545
46+ (deftest int-in-test
47+ (is (s/valid? (s/int-in 1 3 ) 2 ))
48+ (is (not (s/valid? (s/int-in 1 3 ) 0 ))))
49+
50+ (deftest inst-in-test
51+ (is (s/valid? (s/inst-in #inst " 1999" #inst " 2001" ) #inst " 2000" ))
52+ (is (not (s/valid? (s/inst-in #inst " 1999" #inst " 2001" ) #inst " 1492" ))))
53+
4654(comment
4755
4856 (s/conform s2 [42 11 13 15 {:a 1 :b 2 :c 3 } 1 2 3 42 43 44 11 ])
You can’t perform that action at this time.
0 commit comments