Skip to content

Commit 1704f48

Browse files
committed
fix unit test error
1 parent 2e275fb commit 1704f48

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

commons-codeassist/src/test/java/io/onedev/commons/codeassist/TestCodeAssist2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void test() {
115115
assertEquals(1, suggestions.size());
116116
assertEquals("tag(:4", suggestions.get(0).toString());
117117

118-
suggestions = codeAssist.suggest(new InputStatus("branch(master)t"), "query");
118+
suggestions = codeAssist.suggest(new InputStatus("branch(master)ta"), "query");
119119
assertEquals(1, suggestions.size());
120120
assertEquals("branch(master)tag(:18", suggestions.get(0).toString());
121121
}

commons-utils/src/test/java/io/onedev/commons/utils/RangeTest.java renamed to commons-utils/src/test/java/io/onedev/commons/utils/LinearRangeTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55

66
import io.onedev.commons.utils.LinearRange;
77

8-
public class RangeTest {
8+
public class LinearRangeTest {
99

1010
@Test
1111
public void test() {
12-
LinearRange range = LinearRange.match("hello world", "hellowo");
12+
LinearRange range = LinearRange.match("hello world", "hello wo");
1313
Assert.assertEquals(0, range.getFrom());
1414
Assert.assertEquals(8, range.getTo());
1515

16-
range = LinearRange.match(" hello world", "hellowo");
16+
range = LinearRange.match(" hello world", "hello wo");
1717
Assert.assertEquals(1, range.getFrom());
1818
Assert.assertEquals(9, range.getTo());
1919

2020
range = LinearRange.match(" hello world", "ellowo");
2121
Assert.assertEquals(null, range);
2222

23-
range = LinearRange.match(" hello world", "ellowo");
23+
range = LinearRange.match(" hello world", "ello wo");
2424
Assert.assertEquals(2, range.getFrom());
2525
Assert.assertEquals(9, range.getTo());
2626
}

0 commit comments

Comments
 (0)