From 261724e5550b35c0738f959f3137796249ea9f1d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 31 Dec 2021 13:46:13 +0100 Subject: [PATCH] :paperclip: Fix common tests. --- common/test/app/common/geom_shapes_test.cljc | 5 ++--- common/test/app/common/geom_test.cljc | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/common/test/app/common/geom_shapes_test.cljc b/common/test/app/common/geom_shapes_test.cljc index 72eb0e262..a7b190e00 100644 --- a/common/test/app/common/geom_shapes_test.cljc +++ b/common/test/app/common/geom_shapes_test.cljc @@ -181,11 +181,10 @@ shape-before (-> (create-test-shape type {:modifiers modifiers}) (assoc :selrect selrect)) shape-after (gsh/transform-shape shape-before {:round-coords? false})] - (= (:selrect shape-before) (:selrect shape-after))) - :rect {:x 0 :y 0 :x1 0 :y1 0 :x2 ##Inf :y2 ##Inf :width ##Inf :height ##Inf} - :path {:x 0 :y 0 :x1 0 :y1 0 :x2 ##Inf :y2 ##Inf :width ##Inf :height ##Inf} + :rect {:x 0.0 :y 0.0 :x1 0.0 :y1 0.0 :x2 ##Inf :y2 ##Inf :width ##Inf :height ##Inf} + :path {:x 0.0 :y 0.0 :x1 0.0 :y1 0.0 :x2 ##Inf :y2 ##Inf :width ##Inf :height ##Inf} :rect nil :path nil))) diff --git a/common/test/app/common/geom_test.cljc b/common/test/app/common/geom_test.cljc index fce01a061..8a4b7af2f 100644 --- a/common/test/app/common/geom_test.cljc +++ b/common/test/app/common/geom_test.cljc @@ -71,21 +71,21 @@ (t/deftest matrix-constructors-test (let [m (gmt/matrix)] - (t/is (= (str m) "matrix(1,0,0,1,0,0)"))) + (t/is (= (str m) "matrix(1.0,0.0,0.0,1.0,0.0,0.0)"))) (let [m (gmt/matrix 1 1 1 2 2 2)] - (t/is (= (str m) "matrix(1,1,1,2,2,2)")))) + (t/is (= (str m) "matrix(1.0,1.0,1.0,2.0,2.0,2.0)")))) (t/deftest matrix-translate-test (let [m (-> (gmt/matrix) (gmt/translate (gpt/point 2 10)))] - (t/is (= (str m) "matrix(1,0,0,1,2,10)")))) + (t/is (= (str m) "matrix(1.0,0.0,0.0,1.0,2.0,10.0)")))) (t/deftest matrix-scale-test (let [m (-> (gmt/matrix) (gmt/scale (gpt/point 2)))] - (t/is (= (str m) "matrix(2,0,0,2,0,0)")))) + (t/is (= (str m) "matrix(2.0,0.0,0.0,2.0,0.0,0.0)")))) (t/deftest matrix-rotate-test (let [m (-> (gmt/matrix) (gmt/rotate 10))] - (t/is (= (str m) "matrix(0.984807753012208,0.17364817766693033,-0.17364817766693033,0.984807753012208,0,0)")))) + (t/is (= (str m) "matrix(0.984807753012208,0.17364817766693033,-0.17364817766693033,0.984807753012208,0.0,0.0)"))))