diff options
author | Shawn Pearce <spearce@spearce.org> | 2017-07-20 01:51:44 -0700 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2017-07-28 10:18:27 -0700 |
commit | 652a6b033428e6c668333bcf2d510332dca1f8c0 (patch) | |
tree | df6386deb28997ce271ee80ac2588926f98ad400 /org.eclipse.jgit.test | |
parent | ad269ae426fcfcb5884830cd3726385272aea1d1 (diff) | |
download | jgit-652a6b033428e6c668333bcf2d510332dca1f8c0.tar.gz jgit-652a6b033428e6c668333bcf2d510332dca1f8c0.zip |
IntList: support contains(int)
LongList supports contains(long).
IntList should also support contains(int).
Change-Id: Ic7a81c3c25b0f10d92087b56e9f200b676060f63
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java index c6eca9d5e7..d6ea8c604c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java @@ -44,6 +44,7 @@ package org.eclipse.jgit.util; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -186,6 +187,16 @@ public class IntListTest { } @Test + public void testContains() { + IntList i = new IntList(); + i.add(1); + i.add(4); + assertTrue(i.contains(1)); + assertTrue(i.contains(4)); + assertFalse(i.contains(2)); + } + + @Test public void testToString() { final IntList i = new IntList(); i.add(1); |