LibTest.elm (704B)
1 module LibTest exposing (specs) 2 3 import Lib exposing (..) 4 import Test exposing (..) 5 import Expect exposing (Expectation) 6 7 8 specs: Test 9 specs = 10 let runCheck ticks lower upper expected = 11 let label = (Debug.toString (lower, upper)) ++ " -> " ++ (Debug.toString expected) 12 in test label <| \_ -> 13 Expect.equal expected (looseLabels ticks lower upper) 14 in 15 describe "looseLabels" 16 [ runCheck 10 0 100 (0.0, 100.0, 10) 17 , runCheck 10 2 98 (0.0, 100.0, 10) 18 , runCheck 10 8 91 (0.0, 100.0, 10) 19 , runCheck 8 1 32 (0, 40, 10) 20 , runCheck 8 1 36 (0, 40, 10) 21 , runCheck 10 1 4 (1, 4, 0.5) 22 ]