Abstract Method Error unit test and fixes.
Change-Id: I14015ffd9f8adca9d0b2d90b91811c920b13716d
diff --git a/test/AbstractMethod/AbstractClass.java b/test/AbstractMethod/AbstractClass.java
new file mode 100644
index 0000000..0f6a33e
--- /dev/null
+++ b/test/AbstractMethod/AbstractClass.java
@@ -0,0 +1,17 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
+// Test case for AbstractMethodError, we will try to do a non-virtual call to
+// foo.
+abstract class AbstractClass {
+ public AbstractClass() {}
+
+ abstract void foo();
+}
+
+class ConcreteClass extends AbstractClass {
+ public ConcreteClass() {}
+
+ void foo() {
+ throw new Error("This method shouldn't be called");
+ }
+}
diff --git a/test/AbstractMethod/AbstractMethod.java b/test/AbstractMethod/AbstractMethod.java
deleted file mode 100644
index f40e9a9..0000000
--- a/test/AbstractMethod/AbstractMethod.java
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-
-abstract class AbstractMethod {
- abstract void callme();
-
- public AbstractMethod() {
- }
-}
-
-class B extends AbstractMethod {
- void callme() {
- System.out.println("B's implementation of callme");
- }
-}