Sha256: cac7233f1c13237eda222f42ed3d4fa3a1750bc081de64a6bdc37e0068c7d9d4

Contents?: true

Size: 1.22 KB

Versions: 54

Compression:

Stored size: 1.22 KB

Contents

(* Test/exercise version: "1.1.0" *)

open Core
open OUnit2
open Pangram

let ae exp got _test_ctxt = assert_equal ~printer:Bool.to_string exp got

let tests = [
   "sentence empty" >::
      ae false (is_pangram "");
   "pangram with only lower case" >::
      ae true (is_pangram "the quick brown fox jumps over the lazy dog");
   "missing character 'x'" >::
      ae false (is_pangram "a quick movement of the enemy will jeopardize five gunboats");
   "another missing character 'x'" >::
      ae false (is_pangram "the quick brown fish jumps over the lazy dog");
   "pangram with underscores" >::
      ae true (is_pangram "the_quick_brown_fox_jumps_over_the_lazy_dog");
   "pangram with numbers" >::
      ae true (is_pangram "the 1 quick brown fox jumps over the 2 lazy dogs");
   "missing letters replaced by numbers" >::
      ae false (is_pangram "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog");
   "pangram with mixed case and punctuation" >::
      ae true (is_pangram "\"Five quacking Zephyrs jolt my wax bed.\"");
   "upper and lower case versions of the same character should not be counted separately" >::
      ae false (is_pangram "the quick brown fox jumps over with lazy FX");
]

let () =
  run_test_tt_main ("pangram tests" >::: tests)

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trackler-2.2.1.5 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.4 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.3 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.2 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.1 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.0 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.6 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.5 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.4 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.3 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.2 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.1 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.0.0 tracks/ocaml/exercises/pangram/test.ml
trackler-2.1.0.55 tracks/ocaml/exercises/pangram/test.ml