()
| 123 | |
| 124 | /* Test the case where false and zero are skipped */ |
| 125 | @Test |
| 126 | public void testOr05() |
| 127 | { |
| 128 | final PostfixMathCommandI c = new OrCommand(); |
| 129 | final Stack<Object> s = new Stack<>(); |
| 130 | |
| 131 | s.push(false); |
| 132 | s.push(false); |
| 133 | s.push(false); |
| 134 | s.push(false); |
| 135 | |
| 136 | c.setCurNumberOfParameters(4); |
| 137 | |
| 138 | runOr(s, c); |
| 139 | |
| 140 | final Object result = s.pop(); |
| 141 | |
| 142 | assertThat("if (false,false,false,false) returns 0.0", (Double)result, is(closeTo(0.0, 0.1))); |
| 143 | } |
| 144 | } |