Sha256: 91d8b785bf29b43018693ac69ac2d7538b1a30e053d61bb640be21d3a7e6c2fb

Contents?: true

Size: 1.7 KB

Versions: 74

Compression:

Stored size: 1.7 KB

Contents

module Tests exposing (..)

import DifferenceOfSquares exposing (difference, squareOfSum, sumOfSquares)
import Expect
import Test exposing (..)


tests : Test
tests =
    describe "DifferenceOfSquares"
        [ describe "square the sum of the numbers up to the given number"
            [ test "square of sum 5" <|
                \() -> Expect.equal 225 (squareOfSum 5)
            , skip <|
                test "square of sum 10" <|
                    \() -> Expect.equal 3025 (squareOfSum 10)
            , skip <|
                test "square of sum 100" <|
                    \() -> Expect.equal 25502500 (squareOfSum 100)
            ]
        , describe "sum the squares of the numbers up to the given number"
            [ skip <|
                test "sum of squares 5" <|
                    \() -> Expect.equal 55 (sumOfSquares 5)
            , skip <|
                test "sum of squares 10" <|
                    \() -> Expect.equal 385 (sumOfSquares 10)
            , skip <|
                test "sum of squares 100" <|
                    \() -> Expect.equal 338350 (sumOfSquares 100)
            ]
        , describe "subtract sum of squares from square of sums"
            [ skip <|
                test "difference of squares 0" <|
                    \() -> Expect.equal 0 (difference 0)
            , skip <|
                test "difference of squares 5" <|
                    \() -> Expect.equal 170 (difference 5)
            , skip <|
                test "difference of squares 10" <|
                    \() -> Expect.equal 2640 (difference 10)
            , skip <|
                test "difference of squares 100" <|
                    \() -> Expect.equal 25164150 (difference 100)
            ]
        ]

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.179 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.178 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.177 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.176 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.175 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.174 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.173 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.172 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.171 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.170 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.169 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.167 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.166 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.165 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.164 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.163 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.162 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.161 tracks/elm/exercises/difference-of-squares/tests/Tests.elm
trackler-2.2.1.160 tracks/elm/exercises/difference-of-squares/tests/Tests.elm