diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-07 13:44:54 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-07 13:44:54 +0200 |
commit | 96a225fb5fa24a71e1b76e0369126b3bcfab5f81 (patch) | |
tree | 7af2de89c02461607666a9442cbaa5fbf2c94678 /src/test | |
parent | e4faaaf8a022fbe2c8c574d2d49155f74aa18a33 (diff) |
Moved the printer to toplevel
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.ml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/test.ml b/src/test/test.ml index 49cb9ff..9690a72 100644 --- a/src/test/test.ml +++ b/src/test/test.ml @@ -1,13 +1,12 @@ open StdLabels -module T = Translator let error = ref 0 let process (optional_line : string option) expected = match optional_line with | None -> () | Some line -> - match T.Reader.process line with + match Translator.Reader.process line with | exception _ -> error := 1; Printf.fprintf stdout @@ -20,6 +19,7 @@ let process (optional_line : string option) expected = line result | Ok response -> + let response = Sounds.repr (module Repr.Default) response in if String.equal response expected then () (* @@ -38,7 +38,7 @@ let process (optional_line : string option) expected = let rec repeat input expected = (* Attempt to read one line. *) - let optional_line, continue = T.Lexer.line input in + let optional_line, continue = Translator.Lexer.line input in process optional_line expected; if continue then repeat input expected @@ -91,7 +91,7 @@ let tests = ; "groin", "gR[w5]" ; "hélicoptère", "eLikoptER°" ; "hirondelle", "iR§dEL°" - ; "joues", "Zu°(s)" + ; "joues", "Zu(s)" ; "libellule", "LibELyL°" ; "main", "m5" ; "merci", "mERsi" @@ -106,8 +106,11 @@ let tests = ; "personne", "pERson°" ; "plan", "pL@" ; "plat", "pLa(t)" + ; "plein", "pL5" ; "platte", "pLat°" + ; "proie", "pR[wa]" ; "quille", "kij°" + ; "reine", "REn°" ; "soin", "sw5" ; "souris", "suRi(s)" ; "toiture", "t[wa]tyR°" |