()
| 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 |