Skip to content

Commit

Permalink
test: add case where there is no difference in bytecode
Browse files Browse the repository at this point in the history
  • Loading branch information
algomaster99 committed Aug 9, 2024
1 parent a66da62 commit 4b288e5
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,24 @@ void gumtreeShowsDifferenceBetween_stringConcatenationJEP280() throws IOExceptio
List<Action> rootOperations = diff.getRootOperations();
assertThat(rootOperations).size().isEqualTo(21);
}

@Test
void shouldShowNoDifferenceInBytecode() throws IOException {
// arrange
Path oldClass = EQ_SAMECOMP
.resolve("176701")
.resolve("oraclejdk-11.0.19")
.resolve("JavaLanguageParser$AnnotationConstantRestContext.class");
Path newClass = EQ_SAMECOMP
.resolve("176701")
.resolve("oraclejdk-17.0.7")
.resolve("JavaLanguageParser$AnnotationConstantRestContext.class");
DiffImpl diff = getDiff(oldClass, newClass);

// assert
List<Action> rootOperations = diff.getRootOperations();
assertThat(rootOperations).size().isEqualTo(0);
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/EQ/SameComp/176701/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
There is no difference between the two files.
Diffoscope show the difference between constant pool only.

Gumtree wins here.
Loading

0 comments on commit 4b288e5

Please sign in to comment.