mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Added try/catch block
This commit is contained in:
parent
1b44e6ff5f
commit
9712985d29
@ -84,13 +84,19 @@ public class AttrImpl_setValue_String_0 extends BWBaseTest implements Execution
|
||||
TestLoader.logErrPrint("Could not Create Attribute dummyattr_3");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
a.setValue(null);
|
||||
String str = a.getValue();
|
||||
if (str == null) {
|
||||
TestLoader.logErrPrint("Attr 'setValue()' is NULL ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
|
@ -83,6 +83,7 @@ public class AttrImpl_setValue_String_1 extends BWBaseTest implements Execution
|
||||
TestLoader.logErrPrint("Could not Create Attribute dummyattr_4");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
a.setValue("1");
|
||||
String str = a.getValue();
|
||||
if (str == null) {
|
||||
@ -95,6 +96,11 @@ public class AttrImpl_setValue_String_1 extends BWBaseTest implements Execution
|
||||
TestLoader.logErrPrint("Attr 'setValue(1)' FAILED ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
|
Loading…
Reference in New Issue
Block a user