32 lines
889 B
Elm
32 lines
889 B
Elm
module LibTest exposing (specs)
|
|
|
|
import Lib exposing (..)
|
|
import Test exposing (..)
|
|
import Expect exposing (Expectation)
|
|
|
|
specs: Test
|
|
specs =
|
|
describe "looseLabels"
|
|
[ test "0-100" <|
|
|
\_ ->
|
|
let (u, v, _) = looseLabels 10 0.0 100.0
|
|
in Expect.equal (0, 100) (u, v)
|
|
, test "2-98" <|
|
|
\_ ->
|
|
let (u, v, _) = looseLabels 10 2 98
|
|
in Expect.equal (0, 100) (u, v)
|
|
, test "8-91" <|
|
|
\_ ->
|
|
let (u, v, _) = looseLabels 10 8 91
|
|
in Expect.equal (0, 100) (u, v)
|
|
, test "1-32" <|
|
|
\_ ->
|
|
let (u, v, _) = looseLabels 8 1 32
|
|
in Expect.equal (0, 40) (u, v)
|
|
, test "1-4" <|
|
|
\_ ->
|
|
let (u, v, _) = looseLabels 10 1 4
|
|
in Expect.equal (1, 4) (u, v)
|
|
|
|
]
|