Sha256: 51f58f4b5c3f1b2de4cae1c12ecb78fa831dcfcfd0f034f2b46653e04807b382
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
(ns clojure.data-test (:require [clojure.data :refer [diff]])) (defn test-data [] (assert (= [nil nil nil] (diff nil nil))) (assert (= [1 2 nil] (diff 1 2))) (assert (= [nil nil [1 2 3]] (diff [1 2 3] '(1 2 3)))) (assert (= [1 [:a :b] nil] (diff 1 [:a :b]))) (assert (= [{:a 1} :b nil] (diff {:a 1} :b))) (assert (= [:team #{:p1 :p2} nil] (diff :team #{:p1 :p2}))) (assert (= [{0 :a} [:a] nil] (diff {0 :a} [:a]))) (assert (= [nil [nil 2] [1]] (diff [1] [1 2]))) (assert (= [nil nil [1 2]] (diff [1 2] (into-array [1 2])))) (assert (= [#{:a} #{:b} #{:c :d}] (diff #{:a :c :d} #{:b :c :d}))) (assert (= [nil nil {:a 1}] (diff {:a 1} {:a 1}))) (assert (= [{:a #{2}} {:a #{4}} {:a #{3}}] (diff {:a #{2 3}} {:a #{3 4}}))) (assert (= [nil nil [1 2]] (diff [1 2] (into-array [1 2])))) (assert (= [nil nil [1 2]] (diff (into-array [1 2]) [1 2]))) (assert (= [{:a {:c [1]}} {:a {:c [0]}} {:a {:c [nil 2] :b 1}}] (diff {:a {:b 1 :c [1 2]}} {:a {:b 1 :c [0 2]}}))) (assert (= [{:a nil} {:a false} {:b nil :c false}] (diff {:a nil :b nil :c false} {:a false :b nil :c false}))))
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
clementine-0.0.3 | ext/clojure-clojurescript-bef56a7/test/cljs/clojure/data_test.cljs |
clementine-0.0.2 | ext/clojure-clojurescript-bef56a7/test/cljs/clojure/data_test.cljs |