Sha256: 3e032c83368a7feaec4e4b28dfcfa93cd04435361a7146286b6c3867107b332e

Contents?: true

Size: 1.01 KB

Versions: 326

Compression:

Stored size: 1.01 KB

Contents

if !System.get_env("EXERCISM_TEST_EXAMPLES") do
  Code.load_file("crypto_square.exs", __DIR__)
end

ExUnit.start
ExUnit.configure exclude: :pending, trace: true

defmodule CryptoSquareTest do
  use ExUnit.Case

  # @tag :pending
  test "empty string" do
    assert CryptoSquare.encode("") == ""
  end

  @tag :pending
  test "perfect square" do
    assert CryptoSquare.encode("abcd") == "ac bd"
  end

  @tag :pending
  test "uppercase string" do
    assert CryptoSquare.encode("ABCD") == "ac bd"
  end

  @tag :pending
  test "small imperfect square" do
    assert CryptoSquare.encode("This is easy") == "tis hsy ie sa"
  end

  @tag :pending
  test "punctuation and numbers" do
    assert CryptoSquare.encode("1, 2, 3, Go! Go, for God's sake!") == "1gga 2ook 3fde gos ors"
  end

  @tag :pending
  test "long string" do
    msg = "If man was meant to stay on the ground, god would have given us roots."
    cipher = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau"
    assert CryptoSquare.encode(msg) == cipher
  end
end

Version data entries

326 entries across 326 versions & 1 rubygems

Version Path
trackler-2.2.1.109 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.108 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.107 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.106 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.105 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.104 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.103 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.102 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.101 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.100 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.99 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.98 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.97 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.96 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.95 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.94 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.93 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.92 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.91 tracks/elixir/exercises/crypto-square/crypto_square_test.exs
trackler-2.2.1.90 tracks/elixir/exercises/crypto-square/crypto_square_test.exs