trivial diff: pretty_print test case

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Apr 27 21:07:21 AEST 1998


Estimated hours taken: 0.5

tests/misc_tests/Mmakefile:
tests/misc_tests/pretty_print_test.m:
	Update the expected output for the pretty_print_test
	test case to reflect the actual output, and re-enable
	that test case.  Arguably the extra parentheses in
	the output are undesirable, but they're needed to
	protect against the parser getting confused by
	the relative precedence of `:' and `/' for
	module-qualified symbols (e.g. in `.int' files).
	Also arguably the precedence of `:' is wrong,
	but it's probably not worth fixing this now since
	we plan to replace `:' with `.'.

	Also change the rule for `clean_ugly' to avoid hard-coding
	the path name `/bin/rm' and to instead use just `rm'.
	In some environments (e.g. Windows with gnu-win32),
	`rm' might not be in `/bin'.

cvs diff  tests/misc_tests/Mmakefile tests/misc_tests/pretty_print_test.exp
Index: tests/misc_tests/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/misc_tests/Mmakefile,v
retrieving revision 1.8
diff -u -r1.8 Mmakefile
--- Mmakefile	1998/04/27 08:49:46	1.8
+++ Mmakefile	1998/04/27 10:58:47
@@ -16,10 +16,7 @@
 
 PROGS =
 
-OTHER_TESTS = mdemangle_test
-
-# does not work at the moment
-# OTHERTESTS = ... pretty_print_test
+OTHER_TESTS = mdemangle_test pretty_print_test
 
 #-----------------------------------------------------------------------------#
 
@@ -44,6 +41,6 @@
 clean:	clean_ugly
 
 clean_ugly:
-	/bin/rm -fr *.ugly
+	rm -fr *.ugly
 
 #-----------------------------------------------------------------------------#
Index: tests/misc_tests/pretty_print_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/misc_tests/pretty_print_test.exp,v
retrieving revision 1.1
diff -u -r1.1 pretty_print_test.exp
--- pretty_print_test.exp	1998/02/16 17:23:17	1.1
+++ pretty_print_test.exp	1998/04/27 08:52:04
@@ -25,10 +25,10 @@
 	mode pretty_print_test:type_num_4(in, out)
 ].
 :- instance (numbered_type(int)) where [
-	func(type_num/1) is foo_type_num,
-	func(type_num_2/1) is foo_type_num,
-	pred(type_num_3/2) is foo_type_num_p,
-	pred(type_num_4/2) is foo_type_num_p
+	func((type_num)/1) is foo_type_num,
+	func((type_num_2)/1) is foo_type_num,
+	pred((type_num_3)/2) is foo_type_num_p,
+	pred((type_num_4)/2) is foo_type_num_p
 ].
 :- func pretty_print_test:foo_type_num(int) = int.
 pretty_print_test:foo_type_num(V_1) = 42.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list