make IntList cloneable

This commit is contained in:
2017-09-28 20:25:56 +02:00
parent a178086dfa
commit 235565bfe4
2 changed files with 26 additions and 4 deletions

View File

@@ -455,4 +455,17 @@ public class IntListTest {
list.size(), actual.getCapacity());
}
}
@Test
public void testClone() {
final IntList list = new IntList();
list.addAll(1, 2);
final IntList clone = list.clone();
Assert.assertEquals(list, clone);
list.set(1, 0);
Assert.assertNotEquals(list, clone);
}
}