test: fold cljs ports into spec; add exceptions spec + gap coverage
Mine the cljs port batteries into the spec layer and delete them (their behavior is covered by spec; the unique functions they exercised are now specced). Removed test/integration/ports/ entirely. New/expanded spec coverage from the mining: - spec/exceptions-spec: try/catch/finally, throw, ex-info/ex-message/ex-data/ex-cause - doto, pr-str, keyword/symbol constructors, atom?, dynamic var binding Two rare edges filed (jolt-...): rethrow of a caught ex-info re-wraps it; var-set on a dynamic var inside binding no-ops. Core try/catch/ex-info and binding work. Test layout is now spec (22 files, ~677 cases) / integration / unit / support. conformance 218/218, jpm test green.
This commit is contained in:
parent
bcd0e42b33
commit
a681daf7b9
24 changed files with 46 additions and 822 deletions
|
|
@ -13,7 +13,9 @@
|
|||
["reset-vals!" "[0 9]" "(let [a (atom 0)] (reset-vals! a 9))"]
|
||||
["compare-and-set! ok" "true" "(let [a (atom 0)] (compare-and-set! a 0 1))"]
|
||||
["compare-and-set! no" "false" "(let [a (atom 0)] (compare-and-set! a 9 1))"]
|
||||
["atom?" "true" "(do (require (quote [clojure.core])) (instance? clojure.lang.Atom (atom 0)))"])
|
||||
["atom?" "true" "(do (require (quote [clojure.core])) (instance? clojure.lang.Atom (atom 0)))"]
|
||||
["atom? predicate" "true" "(atom? (atom 0))"]
|
||||
["atom? on non-atom" "false" "(atom? 5)"])
|
||||
|
||||
(defspec "state / watches & validators"
|
||||
["add-watch fires" "1" "(let [a (atom 0) seen (atom 0)] (add-watch a :k (fn [k r o n] (reset! seen 1))) (reset! a 5) @seen)"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue