1
exercism fetch elm pascals-triangle

tests/Tests.elm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module Tests exposing (..)

import Expect
import Test exposing (..)
import Triangle exposing (rows)


tests : Test
tests =
    describe "Triangle"
        [ test "no rows" <|
            \() ->
                Expect.equal [] (rows 0)
        , skip <|
            test "single row" <|
                \() ->
                    Expect.equal [ [ 1 ] ] (rows 1)
        , skip <|
            test "two rows" <|
                \() ->
                    Expect.equal [ [ 1 ], [ 1, 1 ] ] (rows 2)
        , skip <|
            test "three rows" <|
                \() ->
                    Expect.equal [ [ 1 ], [ 1, 1 ], [ 1, 2, 1 ] ] (rows 3)
        , skip <|
            test "four rows" <|
                \() ->
                    Expect.equal [ [ 1 ], [ 1, 1 ], [ 1, 2, 1 ], [ 1, 3, 3, 1 ] ] (rows 4)
        , skip <|
            test "negative rows" <|
                \() ->
                    Expect.equal [] (rows -1)
        ]

tests/elm-package.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "version": "3.0.0",
    "summary": "Exercism problems in Elm.",
    "repository": "https://github.com/exercism/elm.git",
    "license": "BSD3",
    "source-directories": [
        ".",
        ".."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.0.0 <= v < 6.0.0",
        "elm-community/elm-test": "4.0.0 <= v < 5.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}