Kaydet (Commit) a3a89c15 authored tarafından Noel Grandin's avatar Noel Grandin

rename state to bSuccessful in Assurance

Change-Id: Ifc86275163a78dd1a61b207f3c6c55d9bf5902d7
üst c429df73
......@@ -27,7 +27,7 @@ public class Assurance
public static final boolean CONTINUE = true;
/** State of the current test method **/
protected boolean state = true;
protected boolean bSuccessful = true;
/** The message if the test did fail **/
protected String message = null;
......@@ -106,7 +106,7 @@ public class Assurance
* @param cont Continue with test method, even if s is false.
*/
protected void assure(String msg, boolean s, boolean cont) {
state &= s;
bSuccessful &= s;
if (!s) {
message += msg + "\r\n";
if (!cont) {
......
......@@ -65,14 +65,14 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
catch (java.lang.reflect.InvocationTargetException e)
{
Throwable t = e.getTargetException();
if (!(t instanceof RuntimeException) || state)
if (!(t instanceof RuntimeException) || bSuccessful)
{
log.println(t.toString());
if (message == null)
{
message = "Exception in before() method.\n\r" + t.getMessage();
}
state = false;
bSuccessful = false;
t.printStackTrace((PrintWriter) log);
}
}
......@@ -99,7 +99,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
DescEntry subEntry = _entry.SubEntries[i];
if (m_bBeforeCalled)
{
state = true;
bSuccessful = true;
message = "";
}
else
......@@ -200,8 +200,8 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
subEntry.ErrorMsg = (msg == null ? "" : msg);
continue;
}
subEntry.State = (state ? "PASSED.OK" : message);
subEntry.hasErrorMsg = !state;
subEntry.State = (bSuccessful ? "PASSED.OK" : message);
subEntry.hasErrorMsg = !bSuccessful;
subEntry.ErrorMsg = message;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment