[llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/VTable.java InstanceOf.java FieldAccess.java
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Sep 15 13:16:22 PDT 2004
Changes in directory llvm-java/test/Programs/SingleSource/UnitTests:
VTable.java updated: 1.1 -> 1.2
InstanceOf.java updated: 1.1 -> 1.2
FieldAccess.java updated: 1.1 -> 1.2
---
Log message:
Rename test classes to avoid class name conflicts.
---
Diffs of the changes: (+28 -36)
Index: llvm-java/test/Programs/SingleSource/UnitTests/VTable.java
diff -u llvm-java/test/Programs/SingleSource/UnitTests/VTable.java:1.1 llvm-java/test/Programs/SingleSource/UnitTests/VTable.java:1.2
--- llvm-java/test/Programs/SingleSource/UnitTests/VTable.java:1.1 Sat Aug 14 03:58:30 2004
+++ llvm-java/test/Programs/SingleSource/UnitTests/VTable.java Wed Sep 15 15:16:12 2004
@@ -1,22 +1,19 @@
-class A
+class VTableBase
{
int foo() { return 0; }
int bar() { return 0; }
}
-class B extends A
+public class VTable extends VTableBase
{
int foo() { return 1; }
-}
-public class VTable
-{
public static void main(String[] args) {
- A a = new A();
+ VTableBase a = new VTableBase();
a.foo();
a.bar();
- a = new B();
+ a = new VTable();
a.foo();
a.bar();
}
Index: llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java
diff -u llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.1 llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.2
--- llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.1 Mon Sep 13 16:35:17 2004
+++ llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java Wed Sep 15 15:16:12 2004
@@ -1,36 +1,33 @@
-class A
+class InstanceOfBase
{
int foo() { return 0; }
int bar() { return 0; }
}
-interface I {
+interface InstanceOfInterface {
public int baz();
}
-class B extends A implements I
+public class InstanceOf extends InstanceOfBase implements InstanceOfInterface
{
int foo() { return 1; }
public int baz() { return foo(); }
-}
-public class InstanceOf
-{
public static void main(String[] args) {
- A aa = new A();
- A ab = new B();
- B bb = new B();
-
- boolean aaA = aa instanceof A;
- boolean aaB = aa instanceof B;
- boolean aaI = aa instanceof I;
-
- boolean abA = ab instanceof A;
- boolean abB = ab instanceof B;
- boolean abI = ab instanceof I;
-
- boolean bbA = bb instanceof A;
- boolean bbB = bb instanceof B;
- boolean bbI = bb instanceof I;
+ InstanceOfBase aa = new InstanceOfBase();
+ InstanceOfBase ab = new InstanceOf();
+ InstanceOfInterface bb = new InstanceOf();
+
+ boolean aaA = aa instanceof InstanceOfBase;
+ boolean aaB = aa instanceof InstanceOf;
+ boolean aaI = aa instanceof InstanceOfInterface;
+
+ boolean abA = ab instanceof InstanceOfBase;
+ boolean abB = ab instanceof InstanceOf;
+ boolean abI = ab instanceof InstanceOfInterface;
+
+ boolean bbA = bb instanceof InstanceOfBase;
+ boolean bbB = bb instanceof InstanceOf;
+ boolean bbI = bb instanceof InstanceOfInterface;
}
}
Index: llvm-java/test/Programs/SingleSource/UnitTests/FieldAccess.java
diff -u llvm-java/test/Programs/SingleSource/UnitTests/FieldAccess.java:1.1 llvm-java/test/Programs/SingleSource/UnitTests/FieldAccess.java:1.2
--- llvm-java/test/Programs/SingleSource/UnitTests/FieldAccess.java:1.1 Sun Jul 25 05:32:13 2004
+++ llvm-java/test/Programs/SingleSource/UnitTests/FieldAccess.java Wed Sep 15 15:16:12 2004
@@ -1,21 +1,19 @@
-class A {
+class FieldAccessBase {
int i;
float f;
}
-class B extends A {
+public class FieldAccess extends FieldAccessBase
+{
int i;
double d;
-}
-public class FieldAccess
-{
public static void main(String[] args) {
- B b = null;
+ FieldAccess b = new FieldAccess();
b.d = 4.0;
b.i = 3;
b.f = 2.0F;
- ((A) b).i = 4;
- ((A) b).f = 1.0F;
+ ((FieldAccessBase) b).i = 4;
+ ((FieldAccessBase) b).f = 1.0F;
}
}
More information about the llvm-commits
mailing list