Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite413d79

Browse files
committed
attached logging to new meyer diff algorithm
1 parentc765616 commite413d79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎java-diff-utils/src/main/java/com/github/difflib/algorithm/myers/MeyersDiffWithLinearSpace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public List<Change> computeDiff(List<T> source, List<T> target, DiffAlgorithmLis
6969

7070
privatevoidbuildScript(DiffDatadata,intstart1,intend1,intstart2,intend2,Consumer<Integer>progress) {
7171
if (progress !=null) {
72-
progress.accept(start1);
72+
progress.accept((end1 -start1) /2 + (end2 -start2) /2);
7373
}
7474
finalSnakemiddle =getMiddleSnake(data,start1,end1,start2,end2);
7575
if (middle ==null

‎java-diff-utils/src/test/java/com/github/difflib/algorithm/myers/MeyersDiffWithLinearSpaceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void diffEnd() {
7171
assertEquals(5,patch.getDeltas().size());
7272
assertEquals("Patch{deltas=[[InsertDelta, position: 0, lines: [C]], [DeleteDelta, position: 0, lines: [A]], [DeleteDelta, position: 2, lines: [C]], [DeleteDelta, position: 5, lines: [B]], [InsertDelta, position: 7, lines: [C]]]}",patch.toString());
7373
System.out.println(logdata);
74-
assertEquals(8,logdata.size());
74+
assertEquals(11,logdata.size());
7575
}
7676

7777

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp