File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 3636(defn- ext [type bytes]
3737 (msg/->Ext type (unsigned-byte-array bytes)))
3838
39- (defmacro round-trip [obj expected-bytes]
40- `(let [obj# ~obj
41- expected-bytes# (unsigned-bytes ~expected-bytes)]
42- (is (= expected-bytes# (seq (msg/pack obj#))))
43- (is (= (normalize obj#) (normalize (msg/unpack expected-bytes#))))))
39+ (defn- round-trip-helper
40+ ([obj expected-bytes] (round-trip-helper obj expected-bytes expected-bytes))
41+ ([obj expected-bytes expected-compat-bytes]
42+ `(let [obj# ~obj
43+ expected-bytes# (unsigned-bytes (if (msg/get-compatibility-mode )
44+ ~expected-compat-bytes
45+ ~expected-bytes))]
46+ (is (= expected-bytes# (seq (msg/pack obj#))))
47+ (is (= (normalize obj#) (normalize (msg/unpack expected-bytes#)))))))
48+
49+ (defmacro round-trip [& args] (apply round-trip-helper args))
4450
4551(deftest nil-test
4652 (testing " nil"
You can’t perform that action at this time.
0 commit comments