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

Method testOr01

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

Source from the content-addressed store, hash-verified

45
46 /* Test the case where the first operand is true */
47 @Test
48 public void testOr01()
49 {
50 final PostfixMathCommandI c = new OrCommand();
51 final Stack<Object> s = new Stack<>();
52
53 s.push(1.0);
54 s.push(2.0);
55
56 c.setCurNumberOfParameters(2);
57
58 runOr(s, c);
59
60 final Double result = (Double) s.pop();
61
62 assertThat("if (1.0,2.0) returns 1.0", result, closeTo(1.0, 0.1));
63 }
64
65 /* Test the case where the first operand is false, but the second is true */
66 @Test

Callers

nothing calls this directly

Calls 3

runOrMethod · 0.95
pushMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected