long/double tests added

some more tests


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@873 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 8864f95b43
commit 263e1db8bb
  1. 90
      jode/test/AnonymousJavac.java

@ -26,8 +26,10 @@ public class AnonymousJavac {
int var = 3;
public void test() {
final long longVar = 5;
final double dblVar = 3;
class Hello {
int var = 4;
int var = (int) longVar;
Hello() {
System.err.println("construct");
@ -41,7 +43,7 @@ public class AnonymousJavac {
Inner.this.hashCode();
Inner.this.var = var;
AnonymousJavac.this.hashCode();
System.err.println("HelloWorld");
System.err.println("HelloWorld: "+dblVar);
}
};
final Hello hi = new Hello();
@ -69,14 +71,19 @@ public class AnonymousJavac {
// };
Inner blub1 = new Inner("Inner param") {
Hello hii = hi;
public void test() {
System.err.println("overwritten");
System.err.println("overwritten: "+hii+hi);
}
};
Inner blub2 = new AnonymousJavac().new Inner("Inner param") {
Hello hii = hi;
public void test() {
System.err.println("overwritten");
System.err.println("overwritten: "+hii);
AnonymousJavac.this.hashCode();
}
};
@ -87,8 +94,9 @@ public class AnonymousJavac {
}
Vector v = new Vector(hi.var, var) {
public String toString() {
return super.toString();
Hello hii = hi;
public Object clone() {
return super.clone();
}
};
@ -99,4 +107,74 @@ public class AnonymousJavac {
}
}
public void test() {
class Hello {
int var = 4;
Hello() {
System.err.println("construct");
}
Hello(String info) {
System.err.println("construct: "+info);
}
public void hello() {
this.hashCode();
AnonymousJavac.this.hashCode();
System.err.println("HelloWorld");
}
};
final Hello hi = new Hello();
final Hello ho = new Hello("ho");
final Object o = new Object() {
int blah = 5;
Hello hii = hi;
public String toString() {
this.hii.hello();
hi.hello();
return Integer.toHexString(AnonymousJavac.this.hashCode()
+blah);
}
};
Object p = new Object() {
public String toString() {
return o.toString();
}
};
// Hello blah = new Hello("Hello World") {
// public void hello() {
// System.err.println("overwritten");
// }
// };
Inner blub1 = new Inner("Inner param") {
public void test() {
System.err.println("overwritten");
}
};
Inner blub2 = new AnonymousJavac().new Inner("Inner param") {
public void test() {
System.err.println("overwritten");
}
};
class Hi extends Inner {
public Hi() {
super("Hi World");
}
}
Vector v = new Vector(hi.var, new Inner("Hi").var) {
public Object clone() {
return super.clone();
}
};
Hi hu = new Hi();
}
}

Loading…
Cancel
Save