Source

metrics-clojure / test / metrics / test / histograms.clj

Diff from to

test/metrics/test/histograms.clj

 
 (deftest test-mean
   (let [h (histograms/histogram ["test" "histograms" "test-mean"])]
-    (is (= (histograms/mean h) 0))
+    (is (= (histograms/mean h) 0.0))
     (histograms/update! h 5)
-    (is (= (histograms/mean h) 5))
+    (is (= (histograms/mean h) 5.0))
     (histograms/update! h 15)
-    (is (= (histograms/mean h) 10))))
+    (is (= (histograms/mean h) 10.0))))
 
 (deftest test-number-recorded
   (let [h (histograms/histogram ["test" "histograms" "test-number-recorded"])]
 
 (deftest test-std-dev
   (let [h (histograms/histogram ["test" "histograms" "test-std-dev"])]
-    (is (= (histograms/std-dev h) 0))
+    (is (= (histograms/std-dev h) 0.0))
     (histograms/update! h 2)
     (histograms/update! h 4)
     (histograms/update! h 6)
-    (is (= (histograms/std-dev h) 2))))
+    (is (= (histograms/std-dev h) 2.0))))
 
 (deftest test-smallest
   (let [h (histograms/histogram ["test" "histograms" "test-smallest"])]
-    (is (= (histograms/smallest h) 0))
+    (is (= (histograms/smallest h) 0.0))
     (histograms/update! h 1)
     (histograms/update! h 9)
     (histograms/update! h 3)
-    (is (= (histograms/smallest h) 1))))
+    (is (= (histograms/smallest h) 1.0))))
 
 (deftest test-largest
   (let [h (histograms/histogram ["test" "histograms" "test-largest"])]
-    (is (= (histograms/largest h) 0))
+    (is (= (histograms/largest h) 0.0))
     (histograms/update! h 1)
     (histograms/update! h 9)
     (histograms/update! h 3)
-    (is (= (histograms/largest h) 9))))
+    (is (= (histograms/largest h) 9.0))))
 
 (deftest test-percentiles
   (let [h (histograms/histogram ["test" "histograms" "test-percentiles"])]
 
 (deftest test-clear
   (let [h (histograms/histogram ["test" "histograms" "test-clear"])]
-    (is (= (histograms/mean h) 0))
+    (is (= (histograms/mean h) 0.0))
     (histograms/update! h 5)
-    (is (= (histograms/mean h) 5))
+    (is (= (histograms/mean h) 5.0))
     (histograms/clear! h)
-    (is (= (histograms/mean h) 0))))
+    (is (= (histograms/mean h) 0.0))))