Bug 727152 - Robocop: improve shutdown of mAsserter; r=jmaher

This commit is contained in:
Geoff Brown 2012-08-09 07:06:19 -06:00
parent 3070b4a349
commit bdb85c6387
4 changed files with 4 additions and 5 deletions

View File

@ -10,8 +10,8 @@ public interface Assert {
void dumpLog(String message, Throwable t);
void setLogFile(String filename);
void setTestName(String testName);
void endTest();
void finalize();
void ok(boolean condition, String name, String diag);
void is(Object a, Object b, String name);
void isnot(Object a, Object b, String name);

View File

@ -108,8 +108,7 @@ public class FennecMochitestAssert implements Assert {
}
}
public void finalize() {
// It appears that we call finalize during cleanup, this might be an invalid assertion.
public void endTest() {
String message;
if (mLogTestName != "") {

View File

@ -31,7 +31,7 @@ public class FennecTalosAssert implements Assert {
public void setTestName(String testName) { }
public void finalize() { }
public void endTest() { }
public void ok(boolean condition, String name, String diag) {
if (!condition) {

View File

@ -105,7 +105,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
@Override
public void tearDown() throws Exception {
try {
mAsserter.finalize();
mAsserter.endTest();
mSolo.finalize();
} catch (Throwable e) {
e.printStackTrace();