assertEquals( element_count, map.size() );
// No argument
int[] values_array = map.values();
assertEquals( element_count, values_array.length );
TIntList values_list = new TIntArrayList( values_array );
for ( int i = 0; i < element_count; i++ ) {
assertTrue( values_list.contains( vals[i] ) );
}
// Zero length array
values_array = map.values( new int[0] );
assertEquals( element_count, values_array.length );
values_list = new TIntArrayList( values_array );
for ( int i = 0; i < element_count; i++ ) {
assertTrue( values_list.contains( vals[i] ) );
}
// appropriate length array
values_array = map.values( new int[map.size()] );
assertEquals( element_count, values_array.length );
values_list = new TIntArrayList( values_array );
for ( int i = 0; i < element_count; i++ ) {
assertTrue( values_list.contains( vals[i] ) );
}
// longer array
values_array = map.values( new int[element_count * 2] );
assertEquals( element_count * 2, values_array.length );
values_list = new TIntArrayList( values_array );
for ( int i = 0; i < element_count; i++ ) {
assertTrue( values_list.contains( vals[i] ) );
}
assertEquals( map.getNoEntryValue(), values_array[element_count] );
}