Adding old unit tests to test suite.
These tests are copied straight over. They'll still run, but they're
using the old system.
Change-Id: If494519e52ddf858a9febfc55bdae830468cb3c8
diff --git a/test/030-bad-finalizer/src/Main.java b/test/030-bad-finalizer/src/Main.java
new file mode 100644
index 0000000..c063476
--- /dev/null
+++ b/test/030-bad-finalizer/src/Main.java
@@ -0,0 +1,25 @@
+// Copyright 2007 The Android Open Source Project
+
+/**
+ * Test a class with a bad finalizer.
+ */
+public class Main {
+ public static void main(String[] args) {
+ BadFinalizer bf = new BadFinalizer();
+
+ System.out.println("Constructed object.");
+ bf = null;
+
+ System.out.println("Nulled. Requestion gc.");
+ System.gc();
+
+ for (int i = 0; i < 8; i++) {
+ BadFinalizer.snooze(5000);
+ System.out.println("Requesting another GC.");
+ System.gc();
+ }
+
+ System.out.println("Done waiting.");
+ System.exit(0);
+ }
+}