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.66 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.65 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.64 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.63 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.62 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.61 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.60 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.59 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.58 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.57 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.56 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.55 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.54 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.53 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.52 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.51 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.50 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.49 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.48 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr
trackler-2.2.1.47 tracks/crystal/exercises/run-length-encoding/spec/run_length_encoding_spec.cr