|
@@ -152,6 +152,13 @@ public class ConditionTreeTest extends junit.framework.TestCase {
|
152
|
152
|
assertNull(tree);
|
153
|
153
|
}
|
154
|
154
|
|
|
155
|
+ @Test
|
|
156
|
+ public void testMismatchedBrackets2() {
|
|
157
|
+ final ConditionTree tree = ConditionTree.parseString("0)");
|
|
158
|
+
|
|
159
|
+ assertNull(tree);
|
|
160
|
+ }
|
|
161
|
+
|
155
|
162
|
@Test
|
156
|
163
|
public void testMissingUnaryArg() {
|
157
|
164
|
final ConditionTree tree = ConditionTree.parseString("!");
|
|
@@ -171,12 +178,33 @@ public class ConditionTreeTest extends junit.framework.TestCase {
|
171
|
178
|
final ConditionTree tree = ConditionTree.parseString("0|");
|
172
|
179
|
|
173
|
180
|
assertNull(tree);
|
174
|
|
- }
|
|
181
|
+ }
|
|
182
|
+
|
|
183
|
+ @Test
|
|
184
|
+ public void testMissingBinaryArg2() {
|
|
185
|
+ final ConditionTree tree = ConditionTree.parseString("0|!");
|
|
186
|
+
|
|
187
|
+ assertNull(tree);
|
|
188
|
+ }
|
175
|
189
|
|
176
|
190
|
@Test
|
177
|
191
|
public void testNonExistantOp() {
|
178
|
192
|
final ConditionTree tree = ConditionTree.parseString("0/1");
|
179
|
193
|
|
|
194
|
+ assertNull(tree);
|
|
195
|
+ }
|
|
196
|
+
|
|
197
|
+ @Test
|
|
198
|
+ public void testNoopEvaluation() {
|
|
199
|
+ final ConditionTree tree = ConditionTree.parseString("");
|
|
200
|
+
|
|
201
|
+ assertTrue(tree.evaluate(new boolean[]{true, false, true}));
|
|
202
|
+ }
|
|
203
|
+
|
|
204
|
+ @Test
|
|
205
|
+ public void testBracketedUnary() {
|
|
206
|
+ final ConditionTree tree = ConditionTree.parseString("(+)");
|
|
207
|
+
|
180
|
208
|
assertNull(tree);
|
181
|
209
|
}
|
182
|
210
|
|