File: clj_tuple_test.clj

package info (click to toggle)
clj-tuple-clojure 0.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 260 kB
  • sloc: java: 4,623; xml: 102; makefile: 19
file content (18 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(ns clj-tuple-test
  (:require
    [clojure.test :refer :all]
    [clj-tuple :as t]
    [criterium.core :as c]
    [collection-check :as check]
    [clojure.test.check.generators :as gen]
    [clojure.pprint :as pprint]))

(deftest test-pprint-able
  (is (= (with-out-str (pprint/pprint [1 2 3]))
        (with-out-str (pprint/pprint (t/vector 1 2 3)))))
  (is (= (with-out-str (pprint/pprint {1 2 3 4}))
        (with-out-str (pprint/pprint (t/hash-map 1 2 3 4))))))

(deftest test-equivalency
  (check/assert-vector-like 1e3 (t/vector) gen/int)
  (check/assert-map-like 1e3 (t/hash-map) gen/int gen/int))