Example #1
0
 /** java.util.FastSet#clear() */
 public void test_clear() {
   // Test for method void java.util.FastSet.clear()
   Set orgSet = (Set) hs.clone();
   hs.clear();
   Iterator i = orgSet.iterator();
   assertEquals("Returned non-zero size after clear", 0, hs.size());
   while (i.hasNext()) {
     assertTrue("Failed to clear set", !hs.contains(i.next()));
   }
 }
Example #2
0
 /** java.util.FastSet#size() */
 public void test_size() {
   // Test for method int java.util.FastSet.size()
   assertTrue("Returned incorrect size", hs.size() == (objArray.length + 1));
   hs.clear();
   assertEquals("Cleared set returned non-zero size", 0, hs.size());
 }