// Call test() via base class to test unwinding through multidex. new Main().$noinline$runTest();
}
publicvoid test() { // Call unwind() via Arrays.binarySearch to test unwinding through framework.
Main[] array = { this, this, this };
Arrays.binarySearch(array, 0, 3, this/* value */, this /* comparator */);
}
publicint compare(Main lhs, Main rhs) {
unwind(); // Returning "equal" ensures that we terminate search // after first item and thus call unwind() only once. return0;
}
publicvoid unwind() { if (secondary) {
sigstop(); // This is helper child process. Stop and wait for unwinding. return; // Don't run the tests again in the secondary helper process.
}
if (testLocal) {
System.out.println(unwindInProcess() ? "PASS" : "FAIL");
}
if (testRemote) { // Start a secondary helper process. It will stop itself when it is ready. int pid = startSecondaryProcess(); // Wait for the secondary process to stop and then unwind it remotely.
System.out.println(unwindOtherProcess(pid) ? "PASS" : "FAIL");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.