tracks/ocaml/exercises/run-length-encoding/test.ml in trackler-2.0.8.14 vs tracks/ocaml/exercises/run-length-encoding/test.ml in trackler-2.0.8.15
- old
+ new
@@ -11,10 +11,14 @@
ae "XYZ" (encode "XYZ");
"string with no single characters" >::
ae "2A3B4C" (encode "AABBBCCCC");
"single characters mixed with repeated characters" >::
ae "12WB12W3B24WB" (encode "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB");
+ "multiple whitespace mixed in string" >::
+ ae "2 hs2q q2w2 " (encode " hsqq qww ");
+ "lowercase characters" >::
+ ae "2a3b4c" (encode "aabbbcccc");
]
let decode_tests = [
"empty string" >::
ae "" (decode "");
@@ -22,14 +26,18 @@
ae "XYZ" (decode "XYZ");
"string with no single characters" >::
ae "AABBBCCCC" (decode "2A3B4C");
"single characters with repeated characters" >::
ae "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" (decode "12WB12W3B24WB");
+ "multiple whitespace mixed in string" >::
+ ae " hsqq qww " (decode "2 hs2q q2w2 ");
+ "lower case string" >::
+ ae "aabbbcccc" (decode "2a3b4c");
]
let consistency_tests = [
"encode followed by decode gives original string" >::
- ae "zzz ZZ zZ" (decode (encode "zzz ZZ zZ"));
+ ae "zzz ZZ zZ" (decode "zzz ZZ zZ");
]
let () =
run_test_tt_main (
"run length encoding tests" >:::
\ No newline at end of file