Sha256: 628c9157c3b7e81fd676e8389e8f593cb5e4b4ce3edfc836d1b73a9158aed758

Contents?: true

Size: 1.32 KB

Versions: 29

Compression:

Stored size: 1.32 KB

Contents

module Tests exposing (..)

import Test exposing (..)
import Expect
import AtbashCipher exposing (encode, decode)


tests : Test
tests =
    describe "AtbashCipher"
        [ test "encode no" <|
            \() -> Expect.equal "ml" (encode "no")
        , test "encode yes" <|
            \() -> Expect.equal "bvh" (encode "yes")
        , test "encode OMG" <|
            \() -> Expect.equal "lnt" (encode "OMG")
        , test "encode O M G" <|
            \() -> Expect.equal "lnt" (encode "O M G")
        , test "encode long word" <|
            \() -> Expect.equal "nrmwy oldrm tob" (encode "mindblowingly")
        , test "encode numbers" <|
            \() -> Expect.equal "gvhgr mt123 gvhgr mt" (encode "Testing, 1 2 3, testing.")
        , test "encode sentence" <|
            \() -> Expect.equal "gifgs rhurx grlm" (encode "Truth is fiction.")
        , test "encode all things" <|
            \() ->
                Expect.equal "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
                    (encode "The quick brown fox jumps over the lazy dog.")
        , test "decode word" <|
            \() -> Expect.equal "exercism" (decode "vcvix rhn")
        , test "decode sentence" <|
            \() ->
                Expect.equal "anobstacleisoftenasteppingstone"
                    (decode "zmlyh gzxov rhlug vmzhg vkkrm thglm v")
        ]

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.52 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.51 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.50 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.49 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.48 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.47 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.46 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.45 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.44 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.43 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.42 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.41 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.40 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.39 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.38 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.37 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.36 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.34 tracks/elm/exercises/atbash-cipher/tests/Tests.elm
trackler-2.1.0.33 tracks/elm/exercises/atbash-cipher/tests/Tests.elm