Sha256: feca04dbdd64302fd7ee5d457da56484f88fecdbbdbec83ca6c45c32e0a3fbc2

Contents?: true

Size: 1.59 KB

Versions: 114

Compression:

Stored size: 1.59 KB

Contents

module Tests exposing (..)

import Test exposing (..)
import Expect
import RunLengthEncoding exposing (version, decode, encode)


tests : Test
tests =
    describe "RunLengthEncoding"
        [ test "the solution is for the correct version of the test" <|
            \() -> Expect.equal 2 version
        , test "encode simple" <|
            \() -> Expect.equal "2A3B4C" (encode "AABBBCCCC")
        , skip <|
            test "decode simple" <|
                \() -> Expect.equal "AABBBCCCC" (decode "2A3B4C")
        , skip <|
            test "encode with single values" <|
                \() ->
                    Expect.equal "12WB12W3B24WB"
                        (encode "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB")
        , skip <|
            test "decode with single values" <|
                \() ->
                    Expect.equal "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
                        (decode "12WB12W3B24WB")
        , skip <|
            test "(decode (encode (...)) combination" <|
                \() ->
                    Expect.equal "zzz ZZ  zZ"
                        (decode (encode "zzz ZZ  zZ"))
        , skip <|
            test "decode with a x10 value" <|
                \() ->
                    Expect.equal "WWWWWWWWWW"
                        (decode "10W")
        , skip <|
            test "encode unicode" <|
                \() -> Expect.equal "⏰3⚽2⭐⏰" (encode "⏰⚽⚽⚽⭐⭐⏰")
        , skip <|
            test "decode unicode" <|
                \() -> Expect.equal "⏰⚽⚽⚽⭐⭐⏰" (decode "⏰3⚽2⭐⏰")
        ]

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
trackler-2.2.1.24 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.23 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.22 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.21 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.20 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.19 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.18 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.17 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.16 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.15 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.14 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.13 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.12 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.11 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.10 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.9 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.8 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.7 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.6 tracks/elm/exercises/run-length-encoding/tests/Tests.elm
trackler-2.2.1.5 tracks/elm/exercises/run-length-encoding/tests/Tests.elm