Skip to content

Commit

Permalink
fix some simple spec naming bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dnolen committed Jun 24, 2016
1 parent fdad5a9 commit 4e50980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/cljs/cljs/spec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ specified, return speced vars from all namespaces."
"Returns a spec that validates insts in the range from start
(inclusive) to end (exclusive)."
[start end]
`(let [st# (inst-ms ~start)
et# (inst-ms ~end)
`(let [st# (cljs.core/inst-ms ~start)
et# (cljs.core/inst-ms ~end)
mkdate# (fn [d#] (js/Date. d#))]
(spec (and inst? #(cljs.spec/inst-in-range? ~start ~end %))
(spec (and cljs.core/inst? #(cljs.spec/inst-in-range? ~start ~end %))
:gen (fn []
(gen/fmap mkdate#
(gen/large-integer* {:min st# :max et#}))))))
Expand Down
3 changes: 1 addition & 2 deletions src/test/cljs/cljs/predicates_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
(:require [cljs.test :refer-macros [deftest is]])
(:import [goog.math Long]))


(def pred-val-table
(let [now (js/Date.)
uuid (uuid nil)]
Expand Down Expand Up @@ -36,7 +35,7 @@
natl (goog.math.Long.getZero)
posl (goog.math.Long.fromNumber posint)
negl (goog.math.Long.fromNumber negint)]
[[identity neg? pos? integer? long? neg-long? pos-long? nat-long?]
[[identity neg? pos? integer? int? neg-int? pos-int? nat-int?]
[0 false false true false false false false ]
[1 false true true false false false false ]
[-1 true false true false false false false ]
Expand Down

0 comments on commit 4e50980

Please sign in to comment.