2016-08-17 11:14:17 +00:00
|
|
|
port module Main exposing (..)
|
2016-03-13 20:20:01 +00:00
|
|
|
|
2016-08-17 11:14:17 +00:00
|
|
|
import Test.Runner.Node exposing (run)
|
|
|
|
import Json.Encode exposing (Value)
|
|
|
|
import Test exposing (..)
|
|
|
|
import Expect
|
2016-03-13 20:20:01 +00:00
|
|
|
import Raindrops exposing (raindrops)
|
|
|
|
|
|
|
|
|
|
|
|
tests : Test
|
|
|
|
tests =
|
2016-08-17 11:14:17 +00:00
|
|
|
describe "Raindrops"
|
|
|
|
[ test "1" <|
|
|
|
|
\() -> Expect.equal "1" (raindrops 1)
|
|
|
|
, test "3" <|
|
|
|
|
\() -> Expect.equal "Pling" (raindrops 3)
|
|
|
|
, test "5" <|
|
|
|
|
\() -> Expect.equal "Plang" (raindrops 5)
|
|
|
|
, test "7" <|
|
|
|
|
\() -> Expect.equal "Plong" (raindrops 7)
|
|
|
|
, test "6" <|
|
|
|
|
\() -> Expect.equal "Pling" (raindrops 6)
|
|
|
|
, test "9" <|
|
|
|
|
\() -> Expect.equal "Pling" (raindrops 9)
|
|
|
|
, test "10" <|
|
|
|
|
\() -> Expect.equal "Plang" (raindrops 10)
|
|
|
|
, test "14" <|
|
|
|
|
\() -> Expect.equal "Plong" (raindrops 14)
|
|
|
|
, test "15" <|
|
|
|
|
\() -> Expect.equal "PlingPlang" (raindrops 15)
|
|
|
|
, test "21" <|
|
|
|
|
\() -> Expect.equal "PlingPlong" (raindrops 21)
|
|
|
|
, test "25" <|
|
|
|
|
\() -> Expect.equal "Plang" (raindrops 25)
|
|
|
|
, test "35" <|
|
|
|
|
\() -> Expect.equal "PlangPlong" (raindrops 35)
|
|
|
|
, test "49" <|
|
|
|
|
\() -> Expect.equal "Plong" (raindrops 49)
|
|
|
|
, test "52" <|
|
|
|
|
\() -> Expect.equal "52" (raindrops 52)
|
|
|
|
, test "105" <|
|
|
|
|
\() -> Expect.equal "PlingPlangPlong" (raindrops 105)
|
2016-06-19 21:46:13 +00:00
|
|
|
]
|
2016-03-13 20:20:01 +00:00
|
|
|
|
|
|
|
|
2016-08-23 00:31:41 +00:00
|
|
|
main : Program Value
|
2016-05-13 02:26:52 +00:00
|
|
|
main =
|
2016-08-17 11:14:17 +00:00
|
|
|
run emit tests
|
|
|
|
|
|
|
|
|
|
|
|
port emit : ( String, Value ) -> Cmd msg
|