nippy/test/test_nippy/main.clj

10 lines
334 B
Clojure
Raw Normal View History

2012-07-06 12:53:02 +00:00
(ns test-nippy.main
2012-07-06 19:12:59 +00:00
(:use [clojure.test])
(:require [taoensso.nippy :as nippy]))
2012-07-06 12:53:02 +00:00
2012-07-06 19:12:59 +00:00
;; Remove stuff from stress-data that breaks roundtrip equality
(def test-data (dissoc nippy/stress-data :bytes))
(def roundtrip (comp nippy/thaw-from-bytes nippy/freeze-to-bytes))
(deftest test-roundtrip (is (= test-data (roundtrip test-data))))