Skip to content

Commit

Permalink
#360: Fixed some failing tests due to changed signature of the Until …
Browse files Browse the repository at this point in the history
…constructur.

Co-Authored-By: Marja van Aken <marja@infix.ai>
  • Loading branch information
jvdb and mvanaken committed Feb 23, 2023
1 parent 1896b81 commit a2c92cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/io/parsingdata/metal/token/Until.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ public boolean equals(final Object obj) {
&& Objects.equals(initialSize, ((Until)obj).initialSize)
&& Objects.equals(stepSize, ((Until)obj).stepSize)
&& Objects.equals(maxSize, ((Until)obj).maxSize)
&& Objects.equals(terminator, ((Until)obj).terminator);
&& Objects.equals(terminator, ((Until)obj).terminator)
&& Objects.equals(includeTerminator, ((Until)obj).includeTerminator);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/io/parsingdata/metal/ArgumentsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public static Collection<Object[]> arguments() {
{ TokenRef.class, new Object[] { null, VALID_NAME, null } },
{ TokenRef.class, new Object[] { null, null, null } },
{ TokenRef.class, new Object[] { VALID_NAME, EMPTY_NAME, null } },
{ Until.class, new Object[] { null, VALID_VE, VALID_VE, VALID_VE, VALID_T, null }},
{ Until.class, new Object[] { VALID_NAME, VALID_VE, VALID_VE, VALID_VE, null, null }}
{ Until.class, new Object[] { null, VALID_VE, VALID_VE, VALID_VE, VALID_T, true, null }},
{ Until.class, new Object[] { VALID_NAME, VALID_VE, VALID_VE, VALID_VE, null, false, null }}
});
}

Expand Down
2 changes: 2 additions & 0 deletions core/src/test/java/io/parsingdata/metal/AutoEqualityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public class AutoEqualityTest {
private static final List<Supplier<Object>> BIG_INTEGERS = Arrays.asList(() -> ONE, () -> BigInteger.valueOf(3));
private static final List<Supplier<Object>> PARSE_STATES = Arrays.asList(() -> createFromByteStream(DUMMY_STREAM), () -> createFromByteStream(DUMMY_STREAM, ONE), () -> new ParseState(GRAPH_WITH_REFERENCE, DUMMY_BYTE_STREAM_SOURCE, TEN, new ImmutableList<>(), new ImmutableList<>()));
private static final List<Supplier<Object>> IMMUTABLE_LISTS = Arrays.asList(ImmutableList::new, () -> ImmutableList.create("TEST"), () -> ImmutableList.create(1), () -> ImmutableList.create(1).add(2));
private static final List<Supplier<Object>> BOOLEANS = Arrays.asList(() -> true, () -> false);
private static final Map<Class, List<Supplier<Object>>> mapping = buildMap();

private static Map<Class, List<Supplier<Object>>> buildMap() {
Expand All @@ -190,6 +191,7 @@ private static Map<Class, List<Supplier<Object>>> buildMap() {
result.put(BigInteger.class, BIG_INTEGERS);
result.put(ParseState.class, PARSE_STATES);
result.put(ImmutableList.class, IMMUTABLE_LISTS);
result.put(boolean.class, BOOLEANS);
return result;
}

Expand Down

0 comments on commit a2c92cd

Please sign in to comment.