Sha256: e674043e3ef3d3831ae6e5b3c0e26b9623be3255bed493442cc6ef8dc124c3dd
Contents?: true
Size: 1.67 KB
Versions: 21
Compression:
Stored size: 1.67 KB
Contents
{ "encode": { "description": "run-length encode a string", "cases": [ { "description": "empty string", "input": "", "expected": "" }, { "description": "single characters only are encoded without count", "input": "XYZ", "expected": "XYZ" }, { "description": "string with no single characters", "input": "AABBBCCCC", "expected": "2A3B4C" }, { "description": "single characters mixed with repeated characters", "input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB", "expected": "12WB12W3B24WB" } ] }, "decode": { "description": "run-length decode a string", "cases": [ { "description": "empty string", "input": "", "expected": "" }, { "description": "single characters only", "input": "XYZ", "expected": "XYZ" }, { "description": "string with no single characters", "input": "2A3B4C", "expected": "AABBBCCCC" }, { "description": "single characters with repeated characters", "input": "12WB12W3B24WB", "expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" } ] }, "consistency": { "cases": [ { "description": "encode followed by decode gives original string", "input": "zzz ZZ zZ", "expected": "zzz ZZ zZ" } ] } }
Version data entries
21 entries across 21 versions & 1 rubygems