[Nice-commit] Nice/testsuite/compiler/methods globalconstant.testsuite,1.2,1.3 integer.testsuite,1.5
Brought to you by:
bonniot
From: <ar...@us...> - 2003-06-14 16:21:29
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv19868/F:/nice/testsuite/compiler/methods Modified Files: globalconstant.testsuite integer.testsuite Log Message: Make dispatch on references work across packages. Changed syntax for value patterns: added =value, variable=value, =constant, variable=constant deprecated variable@value removed @null patterns Index: globalconstant.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/globalconstant.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** globalconstant.testsuite 12 Jun 2003 21:04:41 -0000 1.2 --- globalconstant.testsuite 14 Jun 2003 16:21:26 -0000 1.3 *************** *** 5,10 **** int fib(int n); fib(n@int) = fib(n-2) + fib(n-1); ! fib(ONE) = 1; ! fib(TWO) = 1; /// PASS --- 5,10 ---- int fib(int n); fib(n@int) = fib(n-2) + fib(n-1); ! fib(=ONE) = 1; ! fib(=TWO) = 1; /// PASS *************** *** 15,20 **** boolean foo(String); foo(s) = false; ! foo(abc) = true; ! foo(xyz) = false; /// FAIL --- 15,20 ---- boolean foo(String); foo(s) = false; ! foo(=abc) = true; ! foo(=xyz) = false; /// FAIL *************** *** 23,27 **** void foo(int); foo(n) {} ! foo(xxx) {} foo(10) {} --- 23,27 ---- void foo(int); foo(n) {} ! foo(=xxx) {} foo(10) {} *************** *** 31,35 **** void foo(int); foo(n) {} ! foo(xxx) {} /// PASS --- 31,35 ---- void foo(int); foo(n) {} ! foo(=xxx) {} /// PASS *************** *** 42,46 **** boolean foo(String); foo(s) = false; ! foo(abc) = true; /// PASS --- 42,46 ---- boolean foo(String); foo(s) = false; ! foo(=abc) = true; /// PASS *************** *** 52,59 **** boolean foo(A); foo(a) = false; ! foo(xxx) = true; ! foo(yyy) = false; ! /// PASS bug /// package a /// Toplevel --- 52,59 ---- boolean foo(A); foo(a) = false; ! foo(=xxx) = true; ! foo(=yyy) = false; ! /// PASS /// package a /// Toplevel *************** *** 63,68 **** boolean foo(A); foo(a) = false; ! foo(xxx) = true; ! foo(yyy) = false; /// package b import a assert(foo(xxx)); --- 63,68 ---- boolean foo(A); foo(a) = false; ! foo(=xxx) = true; ! foo(=yyy) = false; /// package b import a assert(foo(xxx)); *************** *** 74,77 **** void foo(A); foo(a) {} ! foo(xxx) {} ! foo(xxx) {} --- 74,94 ---- void foo(A); foo(a) {} ! foo(=xxx) {} ! foo(=xxx) {} ! ! /// PASS ! /// package a ! /// Toplevel ! class Color {} ! let Color red = new Color(); ! let Color blue = new Color(); ! let Color green = new Color(); ! String string(Color); ! string(color) = "unknown color"; ! string(=red) = "red"; ! string(=blue) = "blue"; ! string(=green) = "green"; ! /// package b import a ! assert red.string().equals("red"); ! assert blue.string().equals("blue"); ! assert green.string().equals("green"); Index: integer.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/integer.testsuite,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** integer.testsuite 27 Apr 2003 14:26:26 -0000 1.5 --- integer.testsuite 14 Jun 2003 16:21:26 -0000 1.6 *************** *** 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 *************** *** 63,68 **** int fib(int n); fib(n) = fib(n-2) + fib(n-1); ! fib(n@1) = 1; ! fib(n@2) = 1; /// PASS --- 63,68 ---- int fib(int n); fib(n) = fib(n-2) + fib(n-1); ! fib(n=1) = 1; ! fib(n=2) = 1; /// PASS *************** *** 70,75 **** String toStr(char); toStr(c@char) = ""; ! toStr(c@'a') = "a"; ! toStr(c@'b') = "b"; /// FAIL --- 70,75 ---- String toStr(char); toStr(c@char) = ""; ! toStr(c='a') = "a"; ! toStr(c='b') = "b"; /// FAIL *************** *** 88,93 **** /// Toplevel String getStr(int i, String str); ! getStr(0, str@String) = "no "+str; ! getStr(1, str@String) = "one "+str; ! getStr(2, str@String) = "many "+str; getStr(i, str@String) = "unknown code"; --- 88,93 ---- /// Toplevel String getStr(int i, String str); ! getStr(=0, str@String) = "no "+str; ! getStr(=1, str@String) = "one "+str; ! getStr(=2, str@String) = "many "+str; getStr(i, str@String) = "unknown code"; |