Sha256: 563a824ee96086a9fd00fbd8d2bdae309882b9e42e5b80c56a6a559da43b4ee5

Contents?: true

Size: 1.32 KB

Versions: 68

Compression:

Stored size: 1.32 KB

Contents

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

open OUnit2
open Pangram

let ae exp got _test_ctxt = assert_equal ~printer:string_of_bool exp got

let tests = [
   "sentence empty" >::
      ae false (is_pangram "");
   "recognizes a perfect lower case pangram" >::
      ae true (is_pangram "abcdefghijklmnopqrstuvwxyz");
   "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, e.g. 'h'" >::
      ae false (is_pangram "five boxing wizards jump quickly at it");
   "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

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.179 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.178 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.177 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.176 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.175 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.174 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.173 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.172 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.171 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.170 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.169 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.167 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.166 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.165 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.164 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.163 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.162 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.161 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.160 tracks/ocaml/exercises/pangram/test.ml