tracks/ocaml/exercises/run-length-encoding/test.ml in trackler-2.0.8.18 vs tracks/ocaml/exercises/run-length-encoding/test.ml in trackler-2.0.8.19

- old
+ new

@@ -2,11 +2,11 @@ open OUnit2 open Run_length_encoding let ae exp got _test_ctxt = assert_equal exp got ~printer:Fn.id -let encode_tests = [ +let run_length_encode_a_string_tests = [ "empty string" >:: ae "" (encode ""); "single characters only are encoded without count" >:: ae "XYZ" (encode "XYZ"); "string with no single characters" >:: @@ -17,11 +17,11 @@ ae "2 hs2q q2w2 " (encode " hsqq qww "); "lowercase characters" >:: ae "2a3b4c" (encode "aabbbcccc"); ] -let decode_tests = [ +let run_length_decode_a_string_tests = [ "empty string" >:: ae "" (decode ""); "single characters only" >:: ae "XYZ" (decode "XYZ"); "string with no single characters" >:: @@ -32,15 +32,15 @@ ae " hsqq qww " (decode "2 hs2q q2w2 "); "lower case string" >:: ae "aabbbcccc" (decode "2a3b4c"); ] -let consistency_tests = [ +let encode_and_then_decode_tests = [ "encode followed by decode gives original string" >:: - ae "zzz ZZ zZ" (decode "zzz ZZ zZ"); + ae "zzz ZZ zZ" (decode @@ encode "zzz ZZ zZ"); ] let () = run_test_tt_main ( "run length encoding tests" >::: - List.concat [encode_tests; decode_tests; consistency_tests] + List.concat [run_length_encode_a_string_tests; run_length_decode_a_string_tests; encode_and_then_decode_tests] ) \ No newline at end of file