Sha256: 00873965623818e7a36fe2952d547720c10069f68cc73f0ecdc1af88d28530ee

Contents?: true

Size: 1.73 KB

Versions: 19

Compression:

Stored size: 1.73 KB

Contents

open Core.Std
open OUnit2
open Bob

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

let tests =
  ["something">::
     ae "Whatever." (response_for "Tom-ay-to, tom-aaaah-to.");
   "shouts">::
     ae "Whoa, chill out!" (response_for "WATCH OUT!");
   "questions">::
     ae "Sure." (response_for "Does this cryogenic chamber make me look fat?");
   "forceful talking">::
     ae "Whatever." (response_for "Let's go make out behind the gym!");
   "acronyms">::
     ae "Whatever." (response_for "It's ok if you don't want to go to the DMV.");
   "forceful questions">::
     ae "Whoa, chill out!" (response_for "WHAT THE HELL WERE YOU THINKING?");
   "shouting with special characters">::
     ae "Whoa, chill out!"
       (response_for "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!");
   "shouting numbers">::
     ae "Whoa, chill out!" (response_for "1, 2, 3, GO!");
   "statement containing question mark">::
     ae "Whatever." (response_for "Ending with ? means a question.");
   "silence">::
     ae "Fine. Be that way!" (response_for "");
   "prolonged silence">::
     ae "Fine. Be that way!" (response_for "   ");
   "non-letters with question">::
     ae "Sure." (response_for ":) ?");
   "multiple line questons">::
     ae "Whatever."
       (response_for "\nDoes this cryogenic chamber make me look fat? \nno");
   "other whitespace">::
     (* No unicode whitespace as OCaml Core doesn't seem to handle Unicode.
      * Not it seems does it see ASCII 11 (\v) as whitespace.
     *)
     ae "Fine. Be that way!" (response_for "\n\r \t");
   "only numbers">::
     ae "Whatever." (response_for "1, 2, 3");
   "question with only numbers">::
     ae "Sure." (response_for "4?");
  ]

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
trackler-2.0.0.8 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.7 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.6 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.5 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.4 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.3 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.2 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.1 tracks/ocaml/exercises/bob/test.ml
trackler-2.0.0.0 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.4.1 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.4.0 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.3.0 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.2.1 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.2.0 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.1.2 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.1.1 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.1.0 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.0.1 tracks/ocaml/exercises/bob/test.ml
trackler-1.0.0 tracks/ocaml/exercises/bob/test.ml