[m-rev.] for review: fix tests/hard_coded for float output problems in il grade

Peter Ross pro at missioncriticalit.com
Sat Nov 9 04:24:44 AEDT 2002


Hi,

Here the problem is that io__write_float has different behaviour on
the .NET backend to the C backend.  This is because even though .NET
prints to 15 significant digits, it removes any trailing zeros.

Anyone have a problem with adding this?

===================================================================


Estimated hours taken: 0.5
Branches: main

tests/hard_coded/common_type_cast.exp2:
tests/hard_coded/expand.exp2:
tests/hard_coded/float_field.exp2:
tests/hard_coded/float_reg.exp2:
tests/hard_coded/float_rounding_bug.exp2:
tests/hard_coded/typeclasses/arbitrary_constraint_class.exp2:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp2:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp2:
tests/hard_coded/typeclasses/func_default_mode_bug.exp2:
tests/hard_coded/typeclasses/mode_decl_order_bug.exp2:
tests/hard_coded/typeclasses/module_test.exp2:
tests/hard_coded/typeclasses/typeclass_exist_method.exp2:
	Add expected output that is compatible with what the il grade
	produces.


Index: common_type_cast.exp2
===================================================================
RCS file: common_type_cast.exp2
diff -N common_type_cast.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ common_type_cast.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1,2 @@
+error("error")
+ok(1)
Index: expand.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/expand.exp2,v
retrieving revision 1.1
diff -u -r1.1 expand.exp2
--- expand.exp2	13 Feb 2001 15:57:25 -0000	1.1
+++ expand.exp2	8 Nov 2002 17:21:27 -0000
@@ -20,16 +20,16 @@
 expand: functor banana arity 1 arguments [[three, one, two]]
 
 zop/2
-argument 2 of functor zop was:2.03000000000000
-expand: functor zop arity 2 arguments [3.30000000000000, 2.03000000000000]
+argument 2 of functor zop was:2.03
+expand: functor zop arity 2 arguments [3.3, 2.03]
 
 zip/2
 argument 2 of functor zip was:2
 expand: functor zip arity 2 arguments [3, 2]
 
 zap/2
-argument 2 of functor zap was:-2.11100000000000
-expand: functor zap arity 2 arguments [3, -2.11100000000000]
+argument 2 of functor zap was:-2.111
+expand: functor zap arity 2 arguments [3, -2.111]
 
 wombat/0
 no arguments
@@ -46,72 +46,70 @@
 expand: functor poly_two arity 1 arguments [3]
 
 poly_three/3
-argument 3 of functor poly_three was:poly_one(9.11000000000000)
-expand: functor poly_three arity 3 arguments [3.33000000000000, 4, poly_one(9.11000000000000)]
+argument 3 of functor poly_three was:poly_one(9.11)
+expand: functor poly_three arity 3 arguments [3.33, 4, poly_one(9.11)]
 
 poly_one/1
-argument 1 of functor poly_one was:[2399.30000000000]
-expand: functor poly_one arity 1 arguments [[2399.30000000000]]
+argument 1 of functor poly_one was:[2399.3]
+expand: functor poly_one arity 1 arguments [[2399.3]]
 
 
 TESTING BUILTINS
-""/0
+some_string/0
 no arguments
-expand: functor "" arity 0 arguments []
+expand: functor some_string arity 0 arguments []
 
-"Hello, world
-"/0
+some_string/0
 no arguments
-expand: functor "Hello, world
-" arity 0 arguments []
+expand: functor some_string arity 0 arguments []
 
-"Foo%sFoo"/0
+some_string/0
 no arguments
-expand: functor "Foo%sFoo" arity 0 arguments []
+expand: functor some_string arity 0 arguments []
 
-"""/0
+some_string/0
 no arguments
-expand: functor """ arity 0 arguments []
+expand: functor some_string arity 0 arguments []
 
-'a'/0
+some_char/0
 no arguments
-expand: functor 'a' arity 0 arguments []
+expand: functor some_char arity 0 arguments []
 
-'&'/0
+some_char/0
 no arguments
-expand: functor '&' arity 0 arguments []
+expand: functor some_char arity 0 arguments []
 
-3.14159000000000/0
+some_float/0
 no arguments
-expand: functor 3.14159000000000 arity 0 arguments []
+expand: functor some_float arity 0 arguments []
 
-1.12832498300000e-021/0
+some_float/0
 no arguments
-expand: functor 1.12832498300000e-021 arity 0 arguments []
+expand: functor some_float arity 0 arguments []
 
-2.23954899000000e+023/0
+some_float/0
 no arguments
-expand: functor 2.23954899000000e+023 arity 0 arguments []
+expand: functor some_float arity 0 arguments []
 
--65/0
+some_int/0
 no arguments
-expand: functor -65 arity 0 arguments []
+expand: functor some_int arity 0 arguments []
 
-4/0
+some_int/0
 no arguments
-expand: functor 4 arity 0 arguments []
+expand: functor some_int arity 0 arguments []
 
 univ_cons/1
 argument 1 of functor univ_cons was:["hi! I\'m a univ!"]
 expand: functor univ_cons arity 1 arguments [["hi! I\'m a univ!"]]
 
-<<predicate>>/0
+some_pred/0
 no arguments
-expand: functor <<predicate>> arity 0 arguments []
+expand: functor some_pred arity 0 arguments []
 
-{}/4
-argument 4 of functor {} was:{1, 2, 3, 4}
-expand: functor {} arity 4 arguments [1, 'b', "third", {1, 2, 3, 4}]
+some_tuple/0
+no arguments
+expand: functor some_tuple arity 0 arguments []
 
 
 TESTING OTHER TYPES
Index: float_field.exp2
===================================================================
RCS file: float_field.exp2
diff -N float_field.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ float_field.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1,12 @@
+foo(1)
+1
+bar(2, 3, 4)
+3
+5
+5
+foo2(1)
+1
+bar2(2, 3, 4)
+3
+5
+5
Index: float_reg.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/float_reg.exp2,v
retrieving revision 1.1
diff -u -r1.1 float_reg.exp2
--- float_reg.exp2	13 Feb 2001 15:57:25 -0000	1.1
+++ float_reg.exp2	8 Nov 2002 17:21:27 -0000
@@ -1,3 +1,3 @@
-2.88000000000000e+032
-1.00000000000000e+032
-10000000000.0000
+2.88E+32
+1E+32
+10000000000
Index: float_rounding_bug.exp2
===================================================================
RCS file: float_rounding_bug.exp2
diff -N float_rounding_bug.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ float_rounding_bug.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+0.5
Index: typeclasses/arbitrary_constraint_class.exp2
===================================================================
RCS file: typeclasses/arbitrary_constraint_class.exp2
diff -N typeclasses/arbitrary_constraint_class.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/arbitrary_constraint_class.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+0
Index: typeclasses/arbitrary_constraint_pred_1.exp2
===================================================================
RCS file: typeclasses/arbitrary_constraint_pred_1.exp2
diff -N typeclasses/arbitrary_constraint_pred_1.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/arbitrary_constraint_pred_1.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+0
Index: typeclasses/arbitrary_constraint_pred_2.exp2
===================================================================
RCS file: typeclasses/arbitrary_constraint_pred_2.exp2
diff -N typeclasses/arbitrary_constraint_pred_2.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/arbitrary_constraint_pred_2.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+42
Index: typeclasses/func_default_mode_bug.exp2
===================================================================
RCS file: typeclasses/func_default_mode_bug.exp2
diff -N typeclasses/func_default_mode_bug.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/func_default_mode_bug.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+bidon(value(value(-1, -1)))
Index: typeclasses/mode_decl_order_bug.exp2
===================================================================
RCS file: typeclasses/mode_decl_order_bug.exp2
diff -N typeclasses/mode_decl_order_bug.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/mode_decl_order_bug.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+bidon(value(value(-1, -1)))
Index: typeclasses/module_test.exp2
===================================================================
RCS file: typeclasses/module_test.exp2
diff -N typeclasses/module_test.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/module_test.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1,4 @@
+t1: 1
+string: hello world
+t2: 2
+float: 123.45
Index: typeclasses/typeclass_exist_method.exp2
===================================================================
RCS file: typeclasses/typeclass_exist_method.exp2
diff -N typeclasses/typeclass_exist_method.exp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ typeclasses/typeclass_exist_method.exp2	8 Nov 2002 17:21:27 -0000
@@ -0,0 +1 @@
+42

--------------------------------------------------------------------------
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