Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Jun 24, 2016
1 parent 0054677 commit 4feb522
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
public class ExpressionTest {
@Test
public void primitiveBinaryFactoryTest() {
BinaryExpression binaryExpression = CombinationFactory.create(BinaryOperator.ADD, AccessFactory.literal(3.1), AccessFactory.literal(1));
BinaryExpression binaryExpression = CombinationFactory.create(BinaryOperator.ADD, AccessFactory.variable("a", 3.1), AccessFactory.literal(1));
Object realValue = binaryExpression.getValue().getRealValue();
assertEquals("3.1 + 1", binaryExpression.toString());
assertEquals("a + 1", binaryExpression.toString());
assertEquals(4.1, realValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public void test12() throws InterruptedException {
check(synthesizer.getCollectedExpressions(), "this.foo((java.util.List) list2)");

// the valid patches
check(synthesizer.getValidExpressions(), "(null == list) || (0 == ((java.util.List) list).size())");
check(synthesizer.getValidExpressions(), "(null == list) || ((java.util.List) list).isEmpty()");
check(synthesizer.getValidExpressions(), "(list == null) || (list.size() == 0)");
check(synthesizer.getValidExpressions(), "(list == null) || list.isEmpty()");
}

@Test
Expand All @@ -182,7 +182,7 @@ public void test13() throws InterruptedException {
//assertEquals(12,synthesizer.getCollectedExpressions().size());

// the valid patches
check(synthesizer.getValidExpressions(), "(null == list) || ((java.util.List) list).isEmpty()");
check(synthesizer.getValidExpressions(), "(list == null) || list.isEmpty()");
}

private Synthesizer createSynthesizer(int nopolExampleNumber, Map<String, Object[]> o, int line) {
Expand Down

0 comments on commit 4feb522

Please sign in to comment.