Tests: never use System.err
Always print stack traces to System.out, and replace all
System.err.println()'s with System.out.println().
Follow-up of https://android-review.googlesource.com/#/c/187020/ and
https://android-review.googlesource.com/#/c/407032/.
Test: m test-art-host
m test-art-target
Change-Id: I9ab9cd955a8db25b2ec6673790e5bc924f62c88a
diff --git a/test/084-class-init/src/Main.java b/test/084-class-init/src/Main.java
index 28eb3e9..a60fbac 100644
--- a/test/084-class-init/src/Main.java
+++ b/test/084-class-init/src/Main.java
@@ -24,7 +24,7 @@
// that is currently a resolution stub because it's running on behalf of <clinit>.
try {
throwDuringClinit();
- System.err.println("didn't throw!");
+ System.out.println("didn't throw!");
} catch (NullPointerException ex) {
System.out.println("caught exception thrown during clinit");
}
@@ -44,34 +44,34 @@
try {
Thread.sleep(msec);
} catch (InterruptedException ie) {
- System.err.println("sleep interrupted");
+ System.out.println("sleep interrupted");
}
}
static void checkExceptions() {
try {
System.out.println(PartialInit.FIELD0);
- System.err.println("Construction of PartialInit succeeded unexpectedly");
+ System.out.println("Construction of PartialInit succeeded unexpectedly");
} catch (ExceptionInInitializerError eiie) {
System.out.println("Got expected EIIE for FIELD0");
}
try {
System.out.println(PartialInit.FIELD0);
- System.err.println("Load of FIELD0 succeeded unexpectedly");
+ System.out.println("Load of FIELD0 succeeded unexpectedly");
} catch (NoClassDefFoundError ncdfe) {
System.out.println("Got expected NCDFE for FIELD0");
}
try {
System.out.println(PartialInit.FIELD1);
- System.err.println("Load of FIELD1 succeeded unexpectedly");
+ System.out.println("Load of FIELD1 succeeded unexpectedly");
} catch (NoClassDefFoundError ncdfe) {
System.out.println("Got expected NCDFE for FIELD1");
}
try {
System.out.println(Exploder.FIELD);
- System.err.println("Load of FIELD succeeded unexpectedly");
+ System.out.println("Load of FIELD succeeded unexpectedly");
} catch (AssertionError expected) {
System.out.println("Got expected '" + expected.getMessage() + "' from Exploder");
}
@@ -92,7 +92,7 @@
fieldThread.join();
methodThread.join();
} catch (InterruptedException ie) {
- System.err.println(ie);
+ System.out.println(ie);
}
/* print all values */