diff --git a/test/propeller/tools/character_test.cljc b/test/propeller/tools/character_test.cljc index 2b32d9f..cf23fa8 100644 --- a/test/propeller/tools/character_test.cljc +++ b/test/propeller/tools/character_test.cljc @@ -5,9 +5,7 @@ (t/is (= 97 (c/get-ascii (first "abc"))))) (t/deftest is-letter-test - (t/is (c/is-letter (first "abc"))) - ;(t/is (= false (c/is-letter 97))) - ) + (t/is (c/is-letter (first "abc")))) (t/deftest is-digit-test (t/is (c/is-digit (first "545"))) diff --git a/test/propeller/tools/math_test.cljc b/test/propeller/tools/math_test.cljc index 4f35ebb..c189536 100644 --- a/test/propeller/tools/math_test.cljc +++ b/test/propeller/tools/math_test.cljc @@ -20,5 +20,44 @@ (t/is (= 1.0 (m/cos 0))) (t/is (= -1.0 (m/cos (* 3 m/PI))))) -(t/deftest div - (t/is )) +(t/deftest div-test + (t/is (= 0.1 (m/div 1 10)))) + +(t/deftest exp-test + (t/is (m/approx= (m/exp 2) 7.3890 0.001))) + +(t/deftest floor-test + (t/is (= 4.0 (m/floor 4.9))) + (t/is (= 4.0 (m/floor 4.5))) + (t/is (= -11.0 (m/floor -10.5)))) + +(t/deftest log-test + (t/is (= (m/log (m/exp 1)) 1.0)) + (t/is (= (m/log 10 10) 1.0))) + +(t/deftest pow-test + (t/is (= (m/pow 5 2) 25.0))) + +(t/deftest root + (t/is (= (m/root 16 2) 4.0))) + +(t/deftest sign-test + (t/is (= -1 (m/sign -10))) + (t/is (= 1 (m/sign 10))) + (t/is (= 0 (m/sign 0)))) + +(t/deftest sin-test + (t/is (= 1.0 (m/sin (/ m/PI 2)))) + (t/is (m/approx= 0 (m/sin m/PI) 0.0001))) + +(t/deftest sqrt-test + (t/is (= (m/sqrt 4) 2.0))) + +(t/deftest square-test + (t/is (= (m/square 5) 25))) + +(t/deftest tan-test + (t/is (m/approx= (m/tan (/ m/PI 4)) 1.0 0.00001)) + (t/is (= (m/tan 0) 0.0))) + +