Nice/testsuite/compiler/methods ambiguity.testsuite,1.5,1.6 boolean.testsuite,1.2,1.3 constrained.testsuite,1.6,1.7 coverage.testsuite,1.5,1.6 globalconstant.testsuite,1.10,1.11 implementations.testsuite,1.18,1.19 integer.testsuite,1.16,1.17 nativeOverride.testsuite,1.9,1.10 nullness.testsuite,1.2,1.3 parameterTypeNaming.testsuite,1.4,1.5 primitive.testsuite,1.5,1.6 super.testsuite,1.14,1.15
Arjan Boeijink <[email protected]>
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/testsuite/compiler/methods
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17429/F:/nice/testsuite/compiler/methods
Modified Files:
ambiguity.testsuite boolean.testsuite constrained.testsuite
coverage.testsuite globalconstant.testsuite
implementations.testsuite integer.testsuite
nativeOverride.testsuite nullness.testsuite
parameterTypeNaming.testsuite primitive.testsuite
super.testsuite
Log Message:
Removed deprecated pattern syntax from testsuite.
Index: super.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/super.testsuite,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** super.testsuite 7 Oct 2004 22:03:44 -0000 1.14
--- super.testsuite 1 Mar 2005 18:56:21 -0000 1.15
***************
*** 12,17 ****
/// Toplevel
void m(A);
! m(x@A) {}
! m(x@B) { super; }
/// PASS
--- 12,17 ----
/// Toplevel
void m(A);
! m(A x) {}
! m(B x) { super; }
/// PASS
***************
*** 19,30 ****
/// Toplevel
void m(A);
! m(x@B) { super; }
! m(x@A) {}
/// PASS
/// Toplevel
void m(A);
! m(x#A) {}
! m(x@B) { super; }
/// PASS
--- 19,30 ----
/// Toplevel
void m(A);
! m(B x) { super; }
! m(A x) {}
/// PASS
/// Toplevel
void m(A);
! m(#A x) {}
! m(B x) { super; }
/// PASS
***************
*** 33,38 ****
/// Toplevel
void m(A);
! m(x@A) { throw new RuntimeException(); }
! m(x@B)
{
try {
--- 33,38 ----
/// Toplevel
void m(A);
! m(A x) { throw new RuntimeException(); }
! m(B x)
{
try {
***************
*** 49,55 ****
void m(A, A);
m(x, y) {}
! m(x@A, y@B) {}
! m(x@B, y@A) {}
! m(x@B, y@B) { /*/// FAIL HERE */ super; }
/// PASS
--- 49,55 ----
void m(A, A);
m(x, y) {}
! m(A x, B y) {}
! m(B x, A y) {}
! m(B x, B y) { /*/// FAIL HERE */ super; }
/// PASS
***************
*** 71,82 ****
String m(A);
! m(a@A) = "A";
! m(b@B) = super + "->B";
/// PASS
assert(new B().toString().endsWith("@A@B"));
/// Toplevel
! toString(a@A) = super + "@A";
! toString(b@B) = super + "@B";
/// FAIL
--- 71,82 ----
String m(A);
! m(A a) = "A";
! m(B b) = super + "->B";
/// PASS
assert(new B().toString().endsWith("@A@B"));
/// Toplevel
! toString(A a) = super + "@A";
! toString(B b) = super + "@B";
/// FAIL
***************
*** 85,90 ****
<A T> T m(T);
! m(a#A) = new A();
! m(b@B) = super;
/// FAIL
--- 85,90 ----
<A T> T m(T);
! m(#A a) = new A();
! m(B b) = super;
/// FAIL
***************
*** 122,130 ****
/// Toplevel
void m(A);
! m(a@A) {}
/// package b import a
/// Toplevel
! m(b@B) { super; }
/// PASS
--- 122,130 ----
/// Toplevel
void m(A);
! m(A a) {}
/// package b import a
/// Toplevel
! m(B b) { super; }
/// PASS
***************
*** 133,141 ****
/// Toplevel
void m(A);
! m(@A) { if (false) m(new A()); }
/// package b import a
/// Toplevel
! m(@B) { super; }
/// PASS
--- 133,141 ----
/// Toplevel
void m(A);
! m(A x) { if (false) m(new A()); }
/// package b import a
/// Toplevel
! m(B x) { super; }
/// PASS
***************
*** 143,152 ****
/// package a import b
/// Toplevel
! m(@B) { super; }
/// package b import a
/// Toplevel
void m(A);
! m(@A) { if (false) m(new A()); }
/// PASS
--- 143,152 ----
/// package a import b
/// Toplevel
! m(B x) { super; }
/// package b import a
/// Toplevel
void m(A);
! m(A x) { if (false) m(new A()); }
/// PASS
***************
*** 174,179 ****
abstract class D extends C {}
! equals(x@C, y@D) = true;
! equals(x@D, y@C) = true;
--- 174,179 ----
abstract class D extends C {}
! equals(C x, D y) = true;
! equals(D x, C y) = true;
***************
*** 182,186 ****
abstract class E extends D
{
! equals(x@D) = /*/// FAIL HERE */ super; // This is ambiguous.
}
--- 182,186 ----
abstract class E extends D
{
! equals(D x) = /*/// FAIL HERE */ super; // This is ambiguous.
}
***************
*** 214,218 ****
abstract class A<B> extends AbstractSet<B> { }
! add(a@A, b) = super;
/// PASS
--- 214,218 ----
abstract class A<B> extends AbstractSet<B> { }
! add(A a, b) = super;
/// PASS
***************
*** 224,229 ****
abstract class A<T> extends AbstractSet<T> { T x; }
! add(a@A, b) = false;
! add(a@A, b@B) = super;
/// PASS
--- 224,229 ----
abstract class A<T> extends AbstractSet<T> { T x; }
! add(A a, b) = false;
! add(A a, B b) = super;
/// PASS
***************
*** 245,249 ****
class M {
int f(A);
! f(b@B) = super;
f(a) = 1;
}
--- 245,249 ----
class M {
int f(A);
! f(B b) = super;
f(a) = 1;
}
Index: integer.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/integer.testsuite,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** integer.testsuite 17 Jan 2005 18:26:12 -0000 1.16
--- integer.testsuite 1 Mar 2005 18:56:21 -0000 1.17
***************
*** 2,6 ****
/// Toplevel
long fac(long n);
! fac(n@long) = n*fac(n-1);
fac(1) = 1;
--- 2,6 ----
/// Toplevel
long fac(long n);
! fac(long n) = n*fac(n-1);
fac(1) = 1;
***************
*** 8,12 ****
/// Toplevel
int fib(int n);
! fib(n@int) = fib(n-2) + fib(n-1);
fib(1) = 1;
fib(2) = 1;
--- 8,12 ----
/// Toplevel
int fib(int n);
! fib(int n) = fib(n-2) + fib(n-1);
fib(1) = 1;
fib(2) = 1;
***************
*** 16,22 ****
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,22 ----
int ack(int x, int y);
// missing (0,0) case
! ack(0, int y) = y+1;
! ack(int x, 0) = ack(x-1, 1);
! ack(int x, int y) = ack(x-1, ack(x, y-1));
***************
*** 24,28 ****
/// Toplevel
String toStr(char);
! toStr(@char) = "";
toStr('a') = "a";
toStr('b') = "b";
--- 24,28 ----
/// Toplevel
String toStr(char);
! toStr(char x) = "";
toStr('a') = "a";
toStr('b') = "b";
***************
*** 34,38 ****
/// Toplevel
int bar(int);
! bar(n@int) = n;
bar(-1) = 1;
bar(-12389) = 12389;
--- 34,38 ----
/// Toplevel
int bar(int);
! bar(int n) = n;
bar(-1) = 1;
bar(-12389) = 12389;
***************
*** 46,50 ****
/// Toplevel
boolean foo(char);
! foo(@char) = false;
foo('\1') = true;
foo('\3') = false;
--- 46,50 ----
/// Toplevel
boolean foo(char);
! foo(char x) = false;
foo('\1') = true;
foo('\3') = false;
***************
*** 69,73 ****
/// Toplevel
String toStr(char);
! toStr(c@char) = "";
toStr('a') = "a";
toStr('b') = "b";
--- 69,73 ----
/// Toplevel
String toStr(char);
! toStr(char x) = "";
toStr('a') = "a";
toStr('b') = "b";
***************
*** 76,95 ****
/// Toplevel
void foo(long);
! foo(@long) {}
! foo(@int) {}
/// FAIL
/// Toplevel
void foo(long);
! foo(@long) {}
! foo(#int) {}
/// PASS
/// 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";
/// PASS
--- 76,95 ----
/// Toplevel
void foo(long);
! foo(long n) {}
! foo(int n) {}
/// FAIL
/// Toplevel
void foo(long);
! foo(long n) {}
! foo(#int n) {}
/// PASS
/// Toplevel
String getStr(int i, String str);
! getStr(0, String str) = "no "+str;
! getStr(1, String str) = "one "+str;
! getStr(2, String str) = "many "+str;
! getStr(i, String str) = "unknown code";
/// PASS
Index: coverage.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/coverage.testsuite,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** coverage.testsuite 17 Jan 2005 18:26:12 -0000 1.5
--- coverage.testsuite 1 Mar 2005 18:56:21 -0000 1.6
***************
*** 12,16 ****
class nice.lang.boolean implements I;
! fooI(b1@boolean, b2@boolean) = b1;
class A implements I {
--- 12,16 ----
class nice.lang.boolean implements I;
! fooI(boolean b1, boolean b2) = b1;
class A implements I {
Index: nativeOverride.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/nativeOverride.testsuite,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** nativeOverride.testsuite 2 Feb 2004 13:08:32 -0000 1.9
--- nativeOverride.testsuite 1 Mar 2005 18:56:21 -0000 1.10
***************
*** 30,34 ****
int x;
! equals(that@A) = this.x == that.x;
}
--- 30,34 ----
int x;
! equals(A that) = this.x == that.x;
}
***************
*** 44,48 ****
int x;
! equals(that@B) = this.x == that.x;
}
--- 44,48 ----
int x;
! equals(B that) = this.x == that.x;
}
***************
*** 52,56 ****
/// Toplevel
class A {
! equals(that@A) = true;
}
--- 52,56 ----
/// Toplevel
class A {
! equals(A that) = true;
}
***************
*** 59,63 ****
int x;
! equals(that@B) = this.x == that.x;
}
--- 59,63 ----
int x;
! equals(B that) = this.x == that.x;
}
***************
*** 72,77 ****
int x;
! equals(that@A) = this.x == that.x;
! equals(that@B) = this.x == that.x && that.y == 0;
}
--- 72,77 ----
int x;
! equals(A that) = this.x == that.x;
! equals(B that) = this.x == that.x && that.y == 0;
}
***************
*** 80,84 ****
int y;
! equals(that@B) = this.x == that.x && this.y == that.y;
}
--- 80,84 ----
int y;
! equals(B that) = this.x == that.x && this.y == that.y;
}
***************
*** 90,94 ****
int x;
! equals(that@A) = this.x == that.x;
}
--- 90,94 ----
int x;
! equals(A that) = this.x == that.x;
}
***************
*** 104,108 ****
equals(that) = false;
! equals(that@A) = this.x == that.x;
}
--- 104,108 ----
equals(that) = false;
! equals(A that) = this.x == that.x;
}
***************
*** 117,121 ****
int x;
! equals(that@A) = this.x == that.x;
}
--- 117,121 ----
int x;
! equals(A that) = this.x == that.x;
}
***************
*** 125,132 ****
class B extends A
{
! equals(that@A) = super;
}
! equals(this@A, that@B) = false;
! equals(this@B, that@B) = true;
/// PASS
--- 125,132 ----
class B extends A
{
! equals(A that) = super;
}
! equals(A this, B that) = false;
! equals(B this, B that) = true;
/// PASS
***************
*** 137,141 ****
int x;
! equals(that@A) = this.x == that.x;
}
--- 137,141 ----
int x;
! equals(A that) = this.x == that.x;
}
***************
*** 147,151 ****
/// FAIL
///Toplevel
! /*/// FAIL HERE */ toString(s@String) = "";
/// FAIL
--- 147,151 ----
/// FAIL
///Toplevel
! /*/// FAIL HERE */ toString(String s) = "";
/// FAIL
***************
*** 154,163 ****
class A
{
! equals(that@B) = false;
}
class B extends A
{
! equals(that@A) = true;
}
--- 154,163 ----
class A
{
! equals(B that) = false;
}
class B extends A
{
! equals(A that) = true;
}
***************
*** 189,193 ****
/// FAIL
interface I{}
! equals(x@I,y@I) = true;
/// PASS
--- 189,193 ----
/// FAIL
interface I{}
! equals(I x, I y) = true;
/// PASS
***************
*** 207,211 ****
class Bar<T> extends AbstractList<T>
{
! removeAll(other@Bar) = false;
size() = 0;
--- 207,211 ----
class Bar<T> extends AbstractList<T>
{
! removeAll(Bar other) = false;
size() = 0;
Index: ambiguity.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/ambiguity.testsuite,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ambiguity.testsuite 17 Jan 2005 18:26:10 -0000 1.5
--- ambiguity.testsuite 1 Mar 2005 18:56:21 -0000 1.6
***************
*** 4,9 ****
void /*/// FAIL HERE */ f(A);
! f(x@A) {}
! f(x@A) {}
/// PASS
--- 4,9 ----
void /*/// FAIL HERE */ f(A);
! f(A x) {}
! f(A x) {}
/// PASS
Index: nullness.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/nullness.testsuite,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** nullness.testsuite 25 May 2003 11:13:22 -0000 1.2
--- nullness.testsuite 1 Mar 2005 18:56:21 -0000 1.3
***************
*** 2,6 ****
/// Toplevel
void m(?String);
! m(@String) {}
/// PASS
--- 2,6 ----
/// Toplevel
void m(?String);
! m(String x) {}
/// PASS
***************
*** 9,13 ****
/// Toplevel
boolean foo(?String);
! foo(#String) = true;
foo(null) = false;
--- 9,13 ----
/// Toplevel
boolean foo(?String);
! foo(#String x) = true;
foo(null) = false;
***************
*** 18,20 ****
boolean foo(?String);
foo(null) = false;
! foo(#String) = true;
--- 18,20 ----
boolean foo(?String);
foo(null) = false;
! foo(#String x) = true;
Index: primitive.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/primitive.testsuite,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** primitive.testsuite 19 Dec 2003 02:12:34 -0000 1.5
--- primitive.testsuite 1 Mar 2005 18:56:21 -0000 1.6
***************
*** 1,10 ****
/// FAIL
///Toplevel
! toString(/*/// FAIL HERE */ i@int) = "";
/// FAIL
///Toplevel
<T> void foo(!T) {}
! foo(/*/// FAIL HERE */ i@int) {}
/// FAIL
--- 1,10 ----
/// FAIL
///Toplevel
! toString(/*/// FAIL HERE */ int i) = "";
/// FAIL
///Toplevel
<T> void foo(!T) {}
! foo(/*/// FAIL HERE */ int i) {}
/// FAIL
Index: implementations.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/implementations.testsuite,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** implementations.testsuite 19 Dec 2004 00:09:50 -0000 1.18
--- implementations.testsuite 1 Mar 2005 18:56:21 -0000 1.19
***************
*** 21,25 ****
class C extends A
{
! // It is OK not to implement m(@C,_), since X has no concrete instance.
}
--- 21,25 ----
class C extends A
{
! // It is OK not to implement m(C x,_), since X has no concrete instance.
}
***************
*** 58,62 ****
class B<T> implements A<T> { B<T> bfield; }
! doSomething(b@B) { b.bfield; }
/// FAIL
--- 58,62 ----
class B<T> implements A<T> { B<T> bfield; }
! doSomething(B b) { b.bfield; }
/// FAIL
***************
*** 65,69 ****
void paint(java.awt.Graphics g);
}
! paint([email protected], g) {
(notNull (g)).drawString("I love java", 20, 20);
}
--- 65,69 ----
void paint(java.awt.Graphics g);
}
! paint(java.awt.Component p, g) {
(notNull (g)).drawString("I love java", 20, 20);
}
***************
*** 74,78 ****
void foo(I);
! foo(#I){}
/// FAIL
--- 74,78 ----
void foo(I);
! foo(#I x){}
/// FAIL
***************
*** 81,85 ****
void foo(X);
! foo(#X){}
/// FAIL
--- 81,85 ----
void foo(X);
! foo(#X x){}
/// FAIL
***************
*** 88,93 ****
class B extends A{}
! void foo(B);
! foo(@A){}
/// PASS
--- 88,93 ----
class B extends A{}
! void foo(B x);
! foo(A x){}
/// PASS
***************
*** 101,106 ****
}
<T> A<T> j(A<A<T>>);
! j(b@B) = new B(cons: j(b.cons));
! j(c@C) = new C(cons: j(c.cons));
/// FAIL
--- 101,106 ----
}
<T> A<T> j(A<A<T>>);
! j(B b) = new B(cons: j(b.cons));
! j(C c) = new C(cons: j(c.cons));
/// FAIL
***************
*** 119,123 ****
class A { int i; }
int f(?A);
! f(x@A) = x.i;
f(null) = 0;
--- 119,123 ----
class A { int i; }
int f(?A);
! f(A x) = x.i;
f(null) = 0;
Index: parameterTypeNaming.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/parameterTypeNaming.testsuite,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** parameterTypeNaming.testsuite 8 Dec 2003 19:46:09 -0000 1.4
--- parameterTypeNaming.testsuite 1 Mar 2005 18:56:21 -0000 1.5
***************
*** 11,15 ****
foo(#A x) = x;
! <T> bar(x@B : X)
{
X /*/// FAIL HERE*/ res = foo(x);
--- 11,15 ----
foo(#A x) = x;
! <T> bar(B:X x)
{
X /*/// FAIL HERE*/ res = foo(x);
***************
*** 21,25 ****
void bug() {}
}
! foo(#B) = new A();
/// PASS bug
--- 21,25 ----
void bug() {}
}
! foo(#B x) = new A();
/// PASS bug
***************
*** 27,31 ****
<Collection C, T, U> C<U> bar(C<T>, T->U);
bar(x, f) { throw new Error(); }
! <C,T,U> bar(l@List : L, f)
{
L<U> res = similarEmptyCollection(l);
--- 27,31 ----
<Collection C, T, U> C<U> bar(C<T>, T->U);
bar(x, f) { throw new Error(); }
! <C,T,U> bar(List:L l, f)
{
L<U> res = similarEmptyCollection(l);
***************
*** 50,54 ****
foo(a) = a;
! <T> foo(b@B : X) {
X copy = b.foo();
String useB = copy.b;
--- 50,54 ----
foo(a) = a;
! <T> foo(B:X b) {
X copy = b.foo();
String useB = copy.b;
Index: constrained.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/constrained.testsuite,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** constrained.testsuite 15 Sep 2004 00:47:31 -0000 1.6
--- constrained.testsuite 1 Mar 2005 18:56:21 -0000 1.7
***************
*** 47,51 ****
void foo(I<A>, I<B>);
! foo(@Y,@Y) {}
// @X,@Y is missing
--- 47,51 ----
void foo(I<A>, I<B>);
! foo(Y a, Y b) {}
// @X,@Y is missing
***************
*** 61,66 ****
void foo(I<A>, I<B>);
! foo(@Y,@Y) {}
! foo(@X,@Y) {}
/// FAIL
--- 61,66 ----
void foo(I<A>, I<B>);
! foo(Y a, Y b) {}
! foo(X a, Y b) {}
/// FAIL
Index: globalconstant.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/globalconstant.testsuite,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** globalconstant.testsuite 7 Aug 2004 14:20:28 -0000 1.10
--- globalconstant.testsuite 1 Mar 2005 18:56:21 -0000 1.11
***************
*** 4,8 ****
let int TWO = 2;
int fib(int n);
! fib(n@int) = fib(n-2) + fib(n-1);
fib(ONE) = 1;
fib(TWO) = 1;
--- 4,8 ----
let int TWO = 2;
int fib(int n);
! fib(int n) = fib(n-2) + fib(n-1);
fib(ONE) = 1;
fib(TWO) = 1;
Index: boolean.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/boolean.testsuite,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** boolean.testsuite 25 Feb 2003 19:52:37 -0000 1.2
--- boolean.testsuite 1 Mar 2005 18:56:21 -0000 1.3
***************
*** 5,9 ****
/// Toplevel
boolean not(boolean);
! not(b@boolean) = !b;
/// PASS
--- 5,9 ----
/// Toplevel
boolean not(boolean);
! not(boolean b) = !b;
/// PASS
***************
*** 15,19 ****
/// Toplevel
boolean and(boolean, boolean);
! and(@boolean, @boolean) = false;
and(true, true) = true;
--- 15,19 ----
/// Toplevel
boolean and(boolean, boolean);
! and(boolean a, boolean b) = false;
and(true, true) = true;
***************
*** 28,35 ****
/// FAIL
/// Toplevel
! boolean or(boolean, boolean);
// Ambiguity for the case (@true, @true)
! or(@true, @boolean) = true;
! or(boolean, true) = true;
or(false, false) = false;
--- 28,35 ----
/// FAIL
/// Toplevel
! boolean or(a, b);
// Ambiguity for the case (@true, @true)
! or(true, boolean b) = true;
! or(boolean a, true) = true;
or(false, false) = false;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click