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.147 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.146 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.145 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.144 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.143 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.142 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.141 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.140 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.139 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.138 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.137 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.136 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.135 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.134 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.133 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.132 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.131 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.130 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.129 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.128 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr