@@ -342,43 +342,55 @@ public void testByteBuffer(ByteBuffer v) throws Exception {
342342 public void testList () throws Exception {
343343 // FIXME testList(null);
344344 List <Integer > list0 = new ArrayList <Integer >();
345- testList (list0 );
345+ testList (list0 , Integer . class );
346346 List <Integer > list1 = new ArrayList <Integer >();
347347 Random rand1 = new Random ();
348- for (int i = 0 ; i < 1000 ; ++i ) {
348+ for (int i = 0 ; i < 10 ; ++i ) {
349349 list1 .add (rand1 .nextInt ());
350350 }
351- testList (list1 );
351+ testList (list1 , Integer . class );
352352 List <String > list2 = new ArrayList <String >();
353353 Random rand2 = new Random ();
354- for (int i = 0 ; i < 1000 ; ++i ) {
354+ for (int i = 0 ; i < 100 ; ++i ) {
355355 list2 .add ("xx" + rand2 .nextInt ());
356356 }
357- testList (list2 );
357+ testList (list2 , String .class );
358+ List <String > list3 = new ArrayList <String >();
359+ Random rand3 = new Random ();
360+ for (int i = 0 ; i < 1000 ; ++i ) {
361+ list3 .add ("xx" + rand3 .nextInt ());
362+ }
363+ testList (list3 , String .class );
358364 }
359365
360- public void testList (List v ) throws Exception {
366+ public void testList (List v , Class <?> elementClass ) throws Exception {
361367 }
362368
363369 public void testMap () throws Exception {
364370 // FIXME testMap(null);
365371 Map <Integer , Integer > map0 = new HashMap <Integer , Integer >();
366- testMap (map0 );
372+ testMap (map0 , Integer . class , Integer . class );
367373 Map <Integer , Integer > map1 = new HashMap <Integer , Integer >();
368374 Random rand1 = new Random ();
369- for (int i = 0 ; i < 1000 ; ++i ) {
375+ for (int i = 0 ; i < 10 ; ++i ) {
370376 map1 .put (rand1 .nextInt (), rand1 .nextInt ());
371377 }
372- testMap (map1 );
378+ testMap (map1 , Integer . class , Integer . class );
373379 Map <String , Integer > map2 = new HashMap <String , Integer >();
374380 Random rand2 = new Random ();
375- for (int i = 0 ; i < 1000 ; ++i ) {
381+ for (int i = 0 ; i < 100 ; ++i ) {
376382 map2 .put ("xx" + rand2 .nextInt (), rand2 .nextInt ());
377383 }
378- testMap (map2 );
384+ testMap (map2 , String .class , Integer .class );
385+ Map <String , Integer > map3 = new HashMap <String , Integer >();
386+ Random rand3 = new Random ();
387+ for (int i = 0 ; i < 1000 ; ++i ) {
388+ map3 .put ("xx" + rand3 .nextInt (), rand3 .nextInt ());
389+ }
390+ testMap (map3 , String .class , Integer .class );
379391 }
380392
381- public void testMap (Map v ) throws Exception {
393+ public void testMap (Map v , Class <?> keyElementClass , Class <?> valueElementClass ) throws Exception {
382394 }
383395
384396 public void testBigInteger () throws Exception {
0 commit comments