use of org.eclipse.collections.impl.list.mutable.MultiReaderFastList in project eclipse-collections by eclipse.
the class ListsTest method assertPresizedMultiReaderListEquals.
private static void assertPresizedMultiReaderListEquals(int initialCapacity, MultiReaderFastList<String> list) {
try {
Field delegateField = MultiReaderFastList.class.getDeclaredField("delegate");
delegateField.setAccessible(true);
FastList<String> delegate = (FastList<String>) delegateField.get(list);
Field itemsField = FastList.class.getDeclaredField("items");
itemsField.setAccessible(true);
Object[] items = (Object[]) itemsField.get(delegate);
Assert.assertEquals(initialCapacity, items.length);
} catch (SecurityException | NoSuchFieldException | IllegalAccessException e) {
throw new AssertionError(e);
}
}
Aggregations