babashka/test-resources/lib_tests/com/wsscode/misc/math_test.cljc
Gabriel Horner 093709386a
Add some additional libraries (#1138)
* Add some additional libraries to test

Also improved docs around add-libtest
Close #1137
Close #1128

* Add method needed for supporting pyramid

Pyramid tests passed locally but that was on jvm

* Remove pyramid tests and do in subsequent PR

* Revert "Add method needed for supporting pyramid"

This reverts commit 4d84a2a2ac.

* Skip exoscale tests for windows since most aren't windows compatible
2022-01-14 14:56:09 +01:00

28 lines
620 B
Clojure

(ns com.wsscode.misc.math-test
(:require
[clojure.test :refer [deftest is are run-tests testing]]
[com.wsscode.misc.math :as math]))
(deftest floor-test
(is (= (math/floor 30.2) 30))
(is (= (math/floor 30.9) 30)))
(deftest round-test
(is (= (math/round 30.2) 30))
(is (= (math/round 30.6) 31)))
(deftest ceil-test
(is (= (math/ceil 30.2) 31))
(is (= (math/ceil 30.9) 31)))
(deftest divmod-test
(is (= (math/divmod 10 3)
[3 1])))
(deftest parse-long-test
(is (= (math/parse-long "21")
21)))
(deftest parse-double-test
(is (= (math/parse-double "21.3")
21.3)))