Skip to content

Commit

Permalink
new SegmentBuffer.insert tests
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.code.sf.net/p/jedit/svn/jEdit/trunk@25549 6b1eeb88-9816-0410-afa2-b43733a0f04e
  • Loading branch information
kpouer committed Jan 12, 2022
1 parent e0d335a commit d09f172
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/org/gjt/sp/util/SegmentBufferTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,12 @@ public void testAppendCharArray()
assertEquals(charArray.length + 1, segmentBuffer.count);
assertEquals('a' + inputString, segmentBuffer.toString());
}

@Test
public void testInsert()
{
segmentBuffer.append("hello world".toCharArray());
segmentBuffer.insert(5, "test".toCharArray());
assertEquals("hellotest world", segmentBuffer.toString());
}
}

0 comments on commit d09f172

Please sign in to comment.