()
| 64 | |
| 65 | /* Test the case where the first operand is false, but the second is true */ |
| 66 | @Test |
| 67 | public void testOr02() |
| 68 | { |
| 69 | final PostfixMathCommandI c = new OrCommand(); |
| 70 | final Stack<Double> s = new Stack<>(); |
| 71 | |
| 72 | s.push(0.0); |
| 73 | s.push(2.0); |
| 74 | |
| 75 | c.setCurNumberOfParameters(2); |
| 76 | |
| 77 | runOr(s, c); |
| 78 | |
| 79 | final Double result = s.pop(); |
| 80 | |
| 81 | assertThat("if (0.0,2.0) returns 2.0", result, closeTo(2.0, 0.1)); |
| 82 | } |
| 83 | |
| 84 | /* Test the case where the first two operands are false*/ |
| 85 | @Test |