Search in sources :

Example 1 with CompareEqualDouble

use of pcgen.util.testchecker.CompareEqualDouble in project pcgen by PCGen.

the class OrCommandTest method testOr05.

/* Test the case where false and zero are skipped */
public void testOr05() {
    final PostfixMathCommandI c = new OrCommand();
    final Stack s = new Stack();
    s.push(false);
    s.push(false);
    s.push(false);
    s.push(false);
    c.setCurNumberOfParameters(4);
    runOr(s, c);
    final Object result = s.pop();
    is(result, new CompareEqualDouble(0.0), "if (false,false,false,false) returns 0.0");
}
Also used : PostfixMathCommandI(org.nfunk.jep.function.PostfixMathCommandI) CompareEqualDouble(pcgen.util.testchecker.CompareEqualDouble) Stack(java.util.Stack)

Aggregations

Stack (java.util.Stack)1 PostfixMathCommandI (org.nfunk.jep.function.PostfixMathCommandI)1 CompareEqualDouble (pcgen.util.testchecker.CompareEqualDouble)1