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.45 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.44 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.43 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.42 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.41 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.40 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.39 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.38 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.37 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.36 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.35 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.34 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.33 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.32 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.31 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.30 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.29 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.28 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.27 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.26 tracks/ocaml/exercises/pangram/test.ml