Skip to content

Commit

Permalink
+ test
Browse files Browse the repository at this point in the history
  • Loading branch information
kniazkov committed Nov 27, 2024
1 parent 43c41e8 commit 1cae215
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,22 @@ void secondTestComplexChanges() {
final Map<Node, Node> replaced = mapping.getReplaced();
Assertions.assertEquals(4, replaced.size());
}

@Test
void thirdTestComplexChanges() {
final Node first = DraftNode.create(
"A(X(B,C),Y(B,C))"
);
final Node second = DraftNode.create(
"A(X(C,D),Y(B<'1'>,C))"
);
final Mapper mapper = TopDownMapper.INSTANCE;
final Mapping mapping = mapper.map(first, second);
final List<Insertion> inserted = mapping.getInserted();
Assertions.assertEquals(1, inserted.size());
final Set<Node> deleted = mapping.getDeleted();
Assertions.assertEquals(1, deleted.size());
final Map<Node, Node> replaced = mapping.getReplaced();
Assertions.assertEquals(1, replaced.size());
}
}

0 comments on commit 1cae215

Please sign in to comment.