Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ void testAbbreviate_StringIntInt() {
assertAbbreviateWithOffset("...ijklmno", 15, 10);
assertAbbreviateWithOffset("...ijklmno", 16, 10);
assertAbbreviateWithOffset("...ijklmno", Integer.MAX_VALUE, 10);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for extra blank lines, you have // comments.

// abbreviating a shorter string allows maxWidth < 7
assertEquals("...efg", StringUtils.abbreviate("abcdefg", 5, 6));
}

@Test
Expand Down Expand Up @@ -163,6 +166,10 @@ void testAbbreviate_StringStringIntInt() {
assertAbbreviateWithAbbrevMarkerAndOffset("999ijklmno", "999", 15, 10);
assertAbbreviateWithAbbrevMarkerAndOffset("_ghijklmno", "_", 16, 10);
assertAbbreviateWithAbbrevMarkerAndOffset("+ghijklmno", "+", Integer.MAX_VALUE, 10);

// abbreviating a shorter string allows maxWidth < abbrevMarker.length * 2 + 1
assertEquals("..de", StringUtils.abbreviate("abcde", "..", 4, 4));
assertEquals("....fg", StringUtils.abbreviate("abcdefg", "....", 5, 6));
}

// Fixed LANG-1463
Expand Down
Loading