Search in sources :

Example 6 with Support_MapTest2

use of tests.support.Support_MapTest2 in project j2objc by google.

the class LinkedHashMapTest method test_Constructor.

/**
     * java.util.LinkedHashMap#LinkedHashMap()
     */
public void test_Constructor() {
    // Test for method java.util.LinkedHashMap()
    new Support_MapTest2(new LinkedHashMap()).runTest();
    LinkedHashMap hm2 = new LinkedHashMap();
    assertEquals("Created incorrect LinkedHashMap", 0, hm2.size());
}
Also used : Support_MapTest2(tests.support.Support_MapTest2) LinkedHashMap(java.util.LinkedHashMap)

Example 7 with Support_MapTest2

use of tests.support.Support_MapTest2 in project j2objc by google.

the class HashtableTest method test_Constructor.

/**
     * java.util.Hashtable#Hashtable()
     */
public void test_Constructor() {
    // Test for method java.util.Hashtable()
    new Support_MapTest2(new Hashtable()).runTest();
    Hashtable h = new Hashtable();
    assertEquals("Created incorrect hashtable", 0, h.size());
}
Also used : Hashtable(java.util.Hashtable) Support_MapTest2(tests.support.Support_MapTest2)

Example 8 with Support_MapTest2

use of tests.support.Support_MapTest2 in project j2objc by google.

the class TreeMapTest method test_Constructor.

/**
     * @tests java.util.TreeMap#TreeMap()
     */
public void test_Constructor() {
    // Test for method java.util.TreeMap()
    new Support_MapTest2(new TreeMap()).runTest();
    assertTrue("New treeMap non-empty", new TreeMap().isEmpty());
}
Also used : Support_MapTest2(tests.support.Support_MapTest2) TreeMap(java.util.TreeMap)

Example 9 with Support_MapTest2

use of tests.support.Support_MapTest2 in project robovm by robovm.

the class OldTreeMapTest method test_Constructor.

public void test_Constructor() {
    // Test for method java.util.TreeMap()
    new Support_MapTest2(new TreeMap()).runTest();
    assertTrue("New treeMap non-empty", new TreeMap().isEmpty());
}
Also used : Support_MapTest2(tests.support.Support_MapTest2) TreeMap(java.util.TreeMap)

Example 10 with Support_MapTest2

use of tests.support.Support_MapTest2 in project robovm by robovm.

the class WeakHashMapTest method test_Constructor.

/**
     * java.util.WeakHashMap#WeakHashMap()
     */
public void test_Constructor() {
    // Test for method java.util.WeakHashMap()
    new Support_MapTest2(new WeakHashMap()).runTest();
    whm = new WeakHashMap();
    for (int i = 0; i < 100; i++) whm.put(keyArray[i], valueArray[i]);
    for (int i = 0; i < 100; i++) assertTrue("Incorrect value retrieved", whm.get(keyArray[i]) == valueArray[i]);
}
Also used : Support_MapTest2(tests.support.Support_MapTest2) WeakHashMap(java.util.WeakHashMap)

Aggregations

Support_MapTest2 (tests.support.Support_MapTest2)10 Hashtable (java.util.Hashtable)2 LinkedHashMap (java.util.LinkedHashMap)2 TreeMap (java.util.TreeMap)2 HashMap (java.util.HashMap)1 IdentityHashMap (java.util.IdentityHashMap)1 WeakHashMap (java.util.WeakHashMap)1