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.159 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.158 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.157 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.156 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.155 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.154 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.153 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.152 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.151 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.150 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.149 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.148 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.147 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.146 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.145 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.144 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.143 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.142 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.141 tracks/ocaml/exercises/pangram/test.ml
trackler-2.2.1.140 tracks/ocaml/exercises/pangram/test.ml