[m-dev.] for review: string__fmt

Peter Ross peter.ross at miscrit.be
Fri Aug 11 18:22:24 AEST 2000


On Fri, Aug 11, 2000 at 02:51:00PM +1000, Fergus Henderson wrote:
> On 10-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 
> > Apart from that, this looks fine now.
> 
> Sorry, I spoke a little to soon.
> There are several things that still need to be fixed:
> 
> 	- It needs to pass the test cases.
> 	  Currently the string__format test cases are failing.
> 
Tried to get these done yesterday, but ran out of time.

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


Estimated hours taken: 1

tests/general/float_test.exp:
tests/general/string_format_test.exp:
tests/general/string_format_test.m:
tests/general/string_format_test_2.exp:
tests/general/string_format_test_2.exp2:
tests/general/string_format_test_2.exp3:
tests/general/string_format_test_3.exp:
tests/general/string_format_test_3.exp2:
tests/general/string_format_test_3.exp3:
tests/hard_coded/string_loop.exp:
    Changes required to the test cases for the new string__format.

Index: tests/general/float_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/general/float_test.exp,v
retrieving revision 1.2
diff -u -r1.2 float_test.exp
--- tests/general/float_test.exp	1996/11/25 10:11:14	1.2
+++ tests/general/float_test.exp	2000/08/11 08:15:15
@@ -1,16 +1,16 @@
-1234.5678: 1.234e+3
+1234.5678: 1.23e+03
 X:      3
 Y:      4
 X + Y:      7
 X * Y:     12
 X - Y:     -1
-X / Y:      0
+X / Y:   0.75
 X:     41
 Y:     -3
 X + Y:     38
 X * Y:   -123
 X - Y:     44
-X / Y:    -13
-Float max: 1.797e+308
-Float min: 2.225e-308
-Float epsilon: 2.220e-16
+X / Y:  -13.7
+Float max: 1.8e+308
+Float min: 2.23e-308
+Float epsilon: 2.22e-16
Index: tests/general/string_format_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test.exp,v
retrieving revision 1.1
diff -u -r1.1 string_format_test.exp
--- tests/general/string_format_test.exp	1998/03/03 17:47:21	1.1
+++ tests/general/string_format_test.exp	2000/08/11 08:15:15
@@ -6,7 +6,7 @@
 `In the beginning there was the text, '.
 
 Following line should have 3, 4, 1 significant figures.
-Strangly, 9.99e-1 + 0.999 = 1E+0 
+Strangly, 1.00e-00+  1.000=  2E+00
 
 
 !%0 10.5i!%0+10.5i!%0 -10.5i!%0+-10.5i!
@@ -14,11 +14,11 @@
 !% 10.5x!%+10.5x!% -10.5x!%+-10.5x!
 !%#10.x!%#+10.x!%#-10.x!%#+-10.x!
 
-!-000000031!-000000031!-000310000!-000310000!
-! 000000031!+000000031! 000310000!+000310000!
 !    -00031!    -00031!-00031    !-00031    !
 !     00031!    +00031! 00031    !+00031    !
-!    -0001f!    -0001f!-0001f    !-0001f    !
-!     0001f!    +0001f! 0001f    !+0001f    !
-!     0x-1f!     0x-1f!0x-1f     !0x-1f     !
-!      0x1f!     0x+1f!0x1f      !0x+1f     !
+!    -00031!    -00031!-00031    !-00031    !
+!     00031!    +00031! 00031    !+00031    !
+!  ffffffe1!  ffffffe1!ffffffe1  !ffffffe1  !
+!     0001f!     0001f!0001f     !0001f     !
+!0xffffffe1!0xffffffe1!0xffffffe1!0xffffffe1!
+!      0x1f!      0x1f!0x1f      !0x1f      !
Index: tests/general/string_format_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test.m,v
retrieving revision 1.2
diff -u -r1.2 string_format_test.m
--- tests/general/string_format_test.m	1998/10/28 08:56:08	1.2
+++ tests/general/string_format_test.m	2000/08/11 08:15:15
@@ -23,9 +23,9 @@
 %	{ builtin_float_times( 2.0, Num_nr_1, Num_nr_2) } ,
 	{ builtin_float_plus( Num_nr_1, Num_nr_1, Num_nr_2) } ,
 	[],
-	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_0), f(1.4232), Mg_poly, i(Numba_0)], String_0) } , 
-	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_1), f(1.4232), Mg_poly, i(Numba_1)], String_1) } , 
-	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_2), f(1.4232), Mg_poly, i(Numba_2)], String_2) } , 
+	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_0), f(1.4232), i(Numba_0), Mg_poly], String_0) } , 
+	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_1), f(1.4232), i(Numba_1), Mg_poly], String_1) } , 
+	{ string__format("First %#x characters of fig% 0.1f in MG are\n`%.*s'.\n", [ i(Numba_2), f(1.4232), i(Numba_2), Mg_poly], String_2) } , 
 	[],
 	[],
 	{ string__format("Strangly, %5.2e%- 3c%-5.3f% -3c%-5.0E\n\n",
Index: tests/general/string_format_test_2.exp
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_2.exp,v
retrieving revision 1.2
diff -u -r1.2 string_format_test_2.exp
--- tests/general/string_format_test_2.exp	1999/09/02 05:48:56	1.2
+++ tests/general/string_format_test_2.exp	2000/08/11 08:15:15
@@ -1,3 +1,3 @@
 Uncaught exception:
-Software Error: string__format: argument list has more elements than format string
+Software Error: string__format: format string invalid.
 Stack dump not available in this grade.
Index: tests/general/string_format_test_2.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_2.exp2,v
retrieving revision 1.7
diff -u -r1.7 string_format_test_2.exp2
--- tests/general/string_format_test_2.exp2	2000/02/03 12:09:07	1.7
+++ tests/general/string_format_test_2.exp2	2000/08/11 08:15:15
@@ -1,10 +1,9 @@
 Uncaught exception:
-Software Error: string__format: argument list has more elements than format string
+Software Error: string__format: format string invalid.
 Stack dump follows:
    0       pred exception:throw/1-0 (erroneous) (exception.m:NNNN)
    1       pred require:error/1-0 (erroneous) (require.m:NNNN)
-   2    5* pred string:format_2/3-0 (det) (string.m:NNNN and others)
-   7       pred string:format/3-0 (det) (string.m:NNNN)
-   8       pred io:format/5-0 (det) (io.m:NNNN)
-   9       pred io:format/4-0 (det) (io.m:NNNN)
-  10       pred string_format_test_2:main/2-0 (det) (string_format_test_2.m:13)
+   2       pred string:format/3-0 (det) (string.m:NNNN)
+   3       pred io:format/5-0 (det) (io.m:NNNN)
+   4       pred io:format/4-0 (det) (io.m:NNNN)
+   5       pred string_format_test_2:main/2-0 (det) (string_format_test_2.m:13)
Index: tests/general/string_format_test_2.exp3
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_2.exp3,v
retrieving revision 1.1
diff -u -r1.1 string_format_test_2.exp3
--- tests/general/string_format_test_2.exp3	2000/05/15 18:31:39	1.1
+++ tests/general/string_format_test_2.exp3	2000/08/11 08:15:15
@@ -1,2 +1,2 @@
 Uncaught exception:
-Software Error: string__format: argument list has more elements than format string
+Software Error: string__format: format string invalid.
Index: tests/general/string_format_test_3.exp
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_3.exp,v
retrieving revision 1.2
diff -u -r1.2 string_format_test_3.exp
--- tests/general/string_format_test_3.exp	1999/09/02 05:48:57	1.2
+++ tests/general/string_format_test_3.exp	2000/08/11 08:15:15
@@ -1,3 +1,3 @@
 Uncaught exception:
-Software Error: string__format: argument list has fewer elements than format string
+Software Error: string__format: invalid conversion specifier.
 Stack dump not available in this grade.
Index: tests/general/string_format_test_3.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_3.exp2,v
retrieving revision 1.7
diff -u -r1.7 string_format_test_3.exp2
--- tests/general/string_format_test_3.exp2	2000/02/03 12:09:07	1.7
+++ tests/general/string_format_test_3.exp2	2000/08/11 08:15:15
@@ -1,10 +1,11 @@
 Uncaught exception:
-Software Error: string__format: argument list has fewer elements than format string
+Software Error: string__format: invalid conversion specifier.
 Stack dump follows:
    0       pred exception:throw/1-0 (erroneous) (exception.m:NNNN)
    1       pred require:error/1-0 (erroneous) (require.m:NNNN)
-   2       pred string:format_2/3-0 (det) (string.m:NNNN)
-   3       pred string:format/3-0 (det) (string.m:NNNN)
-   4       pred io:format/5-0 (det) (io.m:NNNN)
-   5       pred io:format/4-0 (det) (io.m:NNNN)
-   6       pred string_format_test_3:main/2-0 (det) (string_format_test_3.m:13)
+   2       pred string:conversion_specification/5-0 (semidet) (string.m:NNNN)
+   3       pred string:format_string/5-0 (det) (string.m:NNNN)
+   4       pred string:format/3-0 (det) (string.m:NNNN)
+   5       pred io:format/5-0 (det) (io.m:NNNN)
+   6       pred io:format/4-0 (det) (io.m:NNNN)
+   7       pred string_format_test_3:main/2-0 (det) (string_format_test_3.m:13)
Index: tests/general/string_format_test_3.exp3
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test_3.exp3,v
retrieving revision 1.1
diff -u -r1.1 string_format_test_3.exp3
--- tests/general/string_format_test_3.exp3	2000/05/15 18:31:39	1.1
+++ tests/general/string_format_test_3.exp3	2000/08/11 08:15:15
@@ -1,2 +1,2 @@
 Uncaught exception:
-Software Error: string__format: argument list has fewer elements than format string
+Software Error: string__format: invalid conversion specifier.
Index: tests/hard_coded/string_loop.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/string_loop.exp,v
retrieving revision 1.2
diff -u -r1.2 string_loop.exp
--- tests/hard_coded/string_loop.exp	1996/07/31 20:50:50	1.2
+++ tests/hard_coded/string_loop.exp	2000/08/11 08:15:16
@@ -1 +1 @@
-0.000000000000000e+0i
+0.000000e+00i


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list