[Nice-commit] Nice/testsuite/compiler/methods integer.testsuite,1.1,1.2
Brought to you by:
bonniot
From: <ar...@us...> - 2003-02-25 20:08:06
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv4942/F:/nice/testsuite/compiler/methods Modified Files: integer.testsuite Log Message: Rewrite of the pattern part of the parser there are 5 different types of patterns now: name value //value can be false, true, null, integer literal or character literal name@value @type name@type And @null patterns are still allowed but will give a warning. Index: integer.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/integer.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** integer.testsuite 25 Feb 2003 12:27:03 -0000 1.1 --- integer.testsuite 25 Feb 2003 20:08:02 -0000 1.2 *************** *** 3,7 **** long fac(long n); fac(n@long) = n*fac(n-1); ! fac(@1) = 1; /// PASS --- 3,7 ---- long fac(long n); fac(n@long) = n*fac(n-1); ! fac(1) = 1; /// PASS *************** *** 9,14 **** int fib(int n); fib(n@int) = fib(n-2) + fib(n-1); ! fib(@1) = 1; ! fib(@2) = 1; /// FAIL --- 9,14 ---- int fib(int n); fib(n@int) = fib(n-2) + fib(n-1); ! fib(1) = 1; ! fib(2) = 1; /// FAIL *************** *** 16,21 **** int ack(int x, int y); // missing (0,0) case ! ack(@0, y@int) = y+1; ! ack(x@int, @0) = ack(x-1, 1); ack(x@int, y@int) = ack(x-1, ack(x, y-1)); --- 16,21 ---- int ack(int x, int y); // missing (0,0) case ! ack(0, y@int) = y+1; ! ack(x@int, 0) = ack(x-1, 1); ack(x@int, y@int) = ack(x-1, ack(x, y-1)); *************** *** 25,31 **** String toStr(char); toStr(@char) = ""; ! toStr(@'a') = "a"; ! toStr(@'b') = "b"; ! toStr(@'a') = "a"; /// PASS --- 25,31 ---- String toStr(char); toStr(@char) = ""; ! toStr('a') = "a"; ! toStr('b') = "b"; ! toStr('a') = "a"; /// PASS *************** *** 35,41 **** int bar(int); bar(n@int) = n; ! bar(@-1) = 1; ! bar(@-12389) = 12389; ! bar(@3920) = -3920; /// package b import a --- 35,41 ---- int bar(int); bar(n@int) = n; ! bar(-1) = 1; ! bar(-12389) = 12389; ! bar(3920) = -3920; /// package b import a *************** *** 47,51 **** void foo(char); foo(@char) {} ! foo(@'a') {} /// package b import a --- 47,51 ---- void foo(char); foo(@char) {} ! foo('a') {} /// package b import a *************** *** 56,75 **** // The default case is missing void foo(short); ! foo(@0) {} ! foo(@1) {} /// PASS /// Toplevel - // literals without @ int fib(int n); fib(n) = fib(n-2) + fib(n-1); ! fib(1) = 1; ! fib(2) = 1; /// PASS /// Toplevel - // literals without @ String toStr(char); ! toStr(@char) = ""; ! toStr('a') = "a"; ! toStr('b') = "b"; --- 56,73 ---- // The default case is missing void foo(short); ! foo(0) {} ! foo(1) {} /// PASS /// Toplevel int fib(int n); fib(n) = fib(n-2) + fib(n-1); ! fib(n@1) = 1; ! fib(n@2) = 1; /// PASS /// Toplevel String toStr(char); ! toStr(c@char) = ""; ! toStr(c@'a') = "a"; ! toStr(c@'b') = "b"; |