Skip to content

Commit 7c4366a

Browse files
ibbempiameier
authored andcommitted
feat: assert that the root DiffNode is unchanged
1 parent f65479f commit 7c4366a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/main/java/org/variantsync/diffdetective/variation/diff

src/main/java/org/variantsync/diffdetective/variation/diff/DiffNode.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,10 @@ public void assertConsistency() {
772772
if (pb != null && pa == null) {
773773
Assert.assertTrue(isRem());
774774
}
775+
// the root was not edited
776+
if (pb == null && pa == null) {
777+
Assert.assertTrue(isNon());
778+
}
775779
// a node with exactly two parents was not edited
776780
if (pb != null && pa != null) {
777781
Assert.assertTrue(isNon());

0 commit comments

Comments
 (0)