diff: fact tables test case
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 9 10:36:30 AEDT 1999
Estimated hours taken: 0.25
tests/hard_coded/Mmakefile:
tests/hard_coded/factt.m:
tests/hard_coded/factt_examples:
tests/hard_coded/factt.exp:
Add a regression test to test three recently-fixed bugs
related to fact tables:
- duplicate C labels,
- incorrect dependencies with --use-subdirs, and
- undefined symbols due to passing the wrong arguments
to c2init.
Index: tests/hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.50
diff -u -r1.50 Mmakefile
--- Mmakefile 1998/11/13 05:32:12 1.50
+++ Mmakefile 1999/02/08 21:27:11
@@ -34,6 +34,7 @@
erroneous_liveness \
expand \
export_test \
+ factt \
float_map \
float_reg \
float_rounding_bug \
Index: tests/hard_coded/factt.exp
===================================================================
RCS file: factt.exp
diff -N factt.exp
--- /dev/null Tue Feb 9 10:29:15 1999
+++ factt.exp Tue Feb 9 09:30:59 1999
@@ -0,0 +1,51 @@
+1 1 0
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+Example call failed.
+50 50 1
+Finished
Index: tests/hard_coded/factt.m
===================================================================
RCS file: factt.m
diff -N factt.m
--- /dev/null Tue Feb 9 10:29:15 1999
+++ factt.m Tue Feb 9 09:44:06 1999
@@ -0,0 +1,33 @@
+:- module factt.
+:- interface.
+
+:- import_module io.
+:- pred main(io__state::di, io__state::uo) is det.
+
+:- implementation.
+
+:- import_module int.
+:- pred example(int::in,int::out,int::out) is semidet.
+
+:- pragma fact_table(example/3,"factt_examples").
+
+:- pred show_examples(int::in,io__state::di, io__state::uo) is det.
+
+main -->
+ show_examples(1).
+
+show_examples(Num) -->
+
+ ({example(Num,Result1,Result2)} ->
+ print(Num),print(" "),
+ print(Result2),print(" "),
+ print(Result1),nl;
+ print("Example call failed."),nl
+ ),
+
+ {Num1 is Num + 1},
+
+ ({Num1 < 51} ->
+ show_examples(Num1);
+ print("Finished"),nl
+ ).
Index: tests/hard_coded/factt_examples
===================================================================
RCS file: factt_examples
diff -N factt_examples
--- /dev/null Tue Feb 9 10:29:15 1999
+++ factt_examples Tue Feb 9 08:28:01 1999
@@ -0,0 +1,4 @@
+example(1,0,1).
+%to
+example(50,1,50).
+
--
Fergus Henderson <fjh at cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh at 128.250.37.3 | -- leaked Microsoft memo.
More information about the developers
mailing list