MCPcopy Create free account
hub / github.com/PCGen/pcgen / testOr02

Method testOr02

code/src/test/plugin/jepcommands/OrCommandTest.java:66–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65 /* Test the case where the first operand is false, but the second is true */
66 @Test
67 public void testOr02()
68 {
69 final PostfixMathCommandI c = new OrCommand();
70 final Stack<Double> s = new Stack<>();
71
72 s.push(0.0);
73 s.push(2.0);
74
75 c.setCurNumberOfParameters(2);
76
77 runOr(s, c);
78
79 final Double result = s.pop();
80
81 assertThat("if (0.0,2.0) returns 2.0", result, closeTo(2.0, 0.1));
82 }
83
84 /* Test the case where the first two operands are false*/
85 @Test

Callers

nothing calls this directly

Calls 3

runOrMethod · 0.95
pushMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected