Sha256: 839768b1f21ed9feb2c8e28f983a30e223d2bbff0d3c0637eb3ba9b03cf8e3d1

Contents?: true

Size: 971 Bytes

Versions: 334

Compression:

Stored size: 971 Bytes

Contents

require "spec"
require "../src/*"

describe "RunLengthEncoding" do
  it "encode empty string" do
    RunLengthEncoding.encode("").should eq("")
  end

  pending "encode single characters only" do
    RunLengthEncoding.encode("XYZ").should eq("XYZ")
  end

  pending "decode empty string" do
    RunLengthEncoding.decode("").should eq("")
  end

  pending "decode single characters only" do
    RunLengthEncoding.decode("XYZ").should eq("XYZ")
  end

  pending "encode simple" do
    RunLengthEncoding.encode("AABBBCCCC").should eq("2A3B4C")
  end

  pending "decode simple" do
    RunLengthEncoding.decode("2A3B4C").should eq("AABBBCCCC")
  end

  pending "encode with single values" do
    RunLengthEncoding.encode("WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB").should eq("12WB12W3B24WB")
  end

  pending "decode with single values" do
    RunLengthEncoding.decode("12WB12W3B24WB").should eq("WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB")
  end
end

Version data entries

334 entries across 334 versions & 1 rubygems

Version Path
trackler-2.2.1.127 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.126 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.125 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.124 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.123 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.122 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.121 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.120 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.119 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.118 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.117 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.116 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.115 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.114 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.113 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.111 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.110 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.109 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.108 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.107 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr