pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-11-13
2002-11-13 13:20:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>
c20941d8d96bfa488e4d06ff882d1a0c34696f23 (
41
lines) (+
30
/-
11
)
[
Show
|
Annotate
]
Branch:
7.9
Added extra RECUR test, and some comments.
Rev: src/testsuite.in:1.561
1:
-
test_true([["$Id: testsuite.in,v 1.
560
2002/11/
07
17
:
14
:
09
marcus
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
561
2002/11/
13
13
:
20
:
33
grubba
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
65:
]],0) test_any([[
+
// Test that F_TAIL_RECUR and RECUR work properly.
class X { int Ack(int M, int N) {
74:
} };
+
return X()->Ack(3,5);
+
]],253)
+
+
test_any([[
+
// Test that F_COND_RECUR works properly.
+
// NB: The class Y may in the future need to overload
+
// the function Ack() to ensure that the RECUR fail
+
// branch is taken in F_COND_RECUR.
+
class X
+
{
+
int Ack(int M, int N) {
+
if (M == 0) return( N + 1 );
+
if (N == 0) return( Ack(M - 1, 1) );
+
return( Ack(M - 1, Ack(M, (N - 1))) );
+
}
+
};
+
class Y { inherit X; }; return Y()->Ack(2,2);