()
| 103 | |
| 104 | /* Test the case where false and zero are skipped */ |
| 105 | @Test |
| 106 | public void testOr04() |
| 107 | { |
| 108 | final PostfixMathCommandI c = new OrCommand(); |
| 109 | final Stack<Object> s = new Stack<>(); |
| 110 | |
| 111 | s.push(0.0); |
| 112 | s.push(false); |
| 113 | s.push(true); |
| 114 | |
| 115 | c.setCurNumberOfParameters(3); |
| 116 | |
| 117 | runOr(s, c); |
| 118 | |
| 119 | final Object result = s.pop(); |
| 120 | |
| 121 | assertThat("if (0.0,false,true) returns true", result, is(true)); |
| 122 | } |
| 123 | |
| 124 | /* Test the case where false and zero are skipped */ |
| 125 | @Test |