diff options
author | fab <fabrice.leal.ch@gmail.com> | 2018-12-12 21:29:05 +0000 |
---|---|---|
committer | fab <fabrice.leal.ch@gmail.com> | 2018-12-12 21:29:05 +0000 |
commit | db41db44f8693d6d1b740eb0b55ef84a4245b576 (patch) | |
tree | eee33ff14e8eb7d025fb98faa71c7d08ad9e1ea6 /tests/utf8.ur | |
parent | e452bb052b6c1afbaaa72efb653ea31561333866 (diff) |
tidy unit tests
Diffstat (limited to 'tests/utf8.ur')
-rw-r--r-- | tests/utf8.ur | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/utf8.ur b/tests/utf8.ur index 777bb141..4a89c22b 100644 --- a/tests/utf8.ur +++ b/tests/utf8.ur @@ -11,32 +11,20 @@ fun from_m_upto_n f m n = fun test_fn_both_sides [a ::: Type] (_ : eq a) (_ : show a) (f : unit -> a) (expected : a) (testname : string) : xbody = <xml> <p>Server side test: {[testname]}</p> - <pre>{[assert (f () = expected) "False" testname "True" ]}</pre> - <active code={let - val computed = f () - val msgErr = "False " ^ testname ^ ": expected " ^ (show expected) ^ " but is " ^ (show computed) - val r = assert (computed = expected) msgErr testname "True" - in - return <xml><p>Client side test: {[testname]}</p><pre>{[r]}</pre></xml> - end}> + <pre>{[show (f () = expected)]}</pre> + <active code={return <xml><p>Client side test: {[testname]}</p><pre>{[show (f () = expected)]}</pre></xml>}> </active> </xml> fun test_fn_sside [a ::: Type] (_ : eq a) (_ : show a) (f : unit -> a) (expected : a) (testname : string) : xbody = <xml> <p>Server side test: {[testname]}</p> - <pre>{[assert (f () = expected) "False" testname "True" ]}</pre> + <pre>{[show (f () = expected)]}</pre> </xml> fun test_fn_cside [a ::: Type] (_ : eq a) (_ : show a) (f : unit -> a) (expected : a) (testname : string) : xbody = <xml> - <active code={let - val computed = f () - val msgErr = "False " ^ testname ^ ": expected " ^ (show expected) ^ " but is " ^ (show computed) - val r = assert (computed = expected) msgErr testname "True" - in - return <xml><p>Client side test: {[testname]}</p><pre>{[r]}</pre></xml> - end}> + <active code={return <xml><p>Client side test: {[testname]}</p><pre>{[show (f () = expected)]}</pre></xml>}> </active> </xml> |