[m-rev.] diff: fix tests/hard_coded/write_binary.m
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue May 4 17:49:33 AEST 2004
tests/hard_coded/write_binary.m:
Make this test clean up after itself by deleting the temporary files
it creates.
Add with_type annotations to avoid a bunch of warnings about
unresolved polymorphism.
Zoltan.
cvs server: Diffing .
Index: write_binary.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_binary.m,v
retrieving revision 1.2
diff -u -b -r1.2 write_binary.m
--- write_binary.m 12 Feb 2004 05:14:41 -0000 1.2
+++ write_binary.m 4 May 2004 07:46:39 -0000
@@ -92,8 +92,8 @@
test_polymorphism -->
io__write_string("TESTING POLYMORPHISM\n"),
- do_test(poly_one([2399.3])),
- do_test(poly_two(3)),
+ do_test(poly_one([2399.3]) `with_type` poly(list(float), int)),
+ do_test(poly_two(3) `with_type` poly(list(float), int)),
do_test(poly_three(3.33, 4, poly_one(9.11))).
@@ -136,13 +136,13 @@
% io__read_binary doesn't work for higher-order terms,
% so this test is expected to fail.
io__write_string("next text is expected to fail:\n"),
- do_test(do_test),
+ do_test(do_test `with_type` pred(int, io, io)),
{ true }.
test_other -->
io__write_string("TESTING OTHER TYPES\n"),
- { term__init_var_supply(VarSupply) },
+ { term__init_var_supply(VarSupply `with_type` var_supply(generic)) },
{ term__create_var(VarSupply, Var, NewVarSupply) },
do_test(Var),
do_test(VarSupply),
@@ -150,7 +150,7 @@
% presently, at least, map is an equivalence and
% an abstract type.
- { map__init(Map) },
+ { map__init(Map `with_type` map(int, string)) },
do_test(Map),
% a no tag type
@@ -191,14 +191,18 @@
{ Result = ok(TermRead0) },
{ TermRead0 = Term }
->
+ io__remove_file(FileName, _),
io__print("ok... "),
{ TermRead = TermRead0 }
;
+ io__remove_file(FileName, _),
{ throw("error reading term back in again") }
)
;
+ io__remove_file(FileName, _),
{ throw(InputRes) }
)
;
+ io__remove_file(FileName, _),
{ throw(OutputRes) }
).
cvs server: Diffing exceptions
cvs server: Diffing purity
cvs server: Diffing sub-modules
cvs server: Diffing typeclasses
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list