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

Method testIf03

code/src/test/plugin/jepcommands/IfCommandTest.java:83–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82 /* Test the case where the condition is a false boolean */
83 @Test
84 public void testIf03()
85 {
86 final PostfixMathCommandI c = new IfCommand();
87 final Stack<Boolean> s = new Stack<>();
88
89 s.push(false);
90 s.push(false);
91 s.push(true);
92
93 runIf(s, c);
94
95 final Boolean result = s.pop();
96
97 assertThat("if (false,false,true) returns true", result, is(true));
98 }
99
100 /* Test the case where the condition is a true boolean */
101 @Test

Callers

nothing calls this directly

Calls 3

runIfMethod · 0.95
pushMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected