/**
* Compare two boolean values for equality and protocol
* the result.
*
* @param testdesc short description of the test.
* @param returned boolean value returned by test candidate.
* @param expected expected boolean value.
*/
public void compare(String testdesc,
boolean returned, boolean expected) {
++numberOfTests;
if (returned == expected) {
protocol += "Passed: ";
++numberOfPassedTests;
} else {
protocol += "Failed: "
+ "Got " + returned
+ " but expected " + expected + ": ";
}
protocol += testdesc + "\n";
}
|