Home | History | Annotate | Download | only in util

Lines Matching refs:hashSet

24 import java.util.HashSet;
41 HashSet hs;
46 * java.util.HashSet#HashSet()
49 // Test for method java.util.HashSet()
50 HashSet hs2 = new HashSet();
51 assertEquals("Created incorrect HashSet", 0, hs2.size());
55 * java.util.HashSet#HashSet(int)
58 // Test for method java.util.HashSet(int)
59 HashSet hs2 = new HashSet(5);
60 assertEquals("Created incorrect HashSet", 0, hs2.size());
62 new HashSet(-1);
71 * java.util.HashSet#HashSet(int, float)
74 // Test for method java.util.HashSet(int, float)
75 HashSet hs2 = new HashSet(5, (float) 0.5);
76 assertEquals("Created incorrect HashSet", 0, hs2.size());
78 new HashSet(0, 0);
87 * java.util.HashSet#HashSet(java.util.Collection)
90 // Test for method java.util.HashSet(java.util.Collection)
91 HashSet hs2 = new HashSet(Arrays.asList(objArray));
93 assertTrue("HashSet does not contain correct elements", hs
95 assertTrue("HashSet created from collection incorrect size",
99 new HashSet(null);
107 * java.util.HashSet#add(java.lang.Object)
110 // Test for method boolean java.util.HashSet.add(java.lang.Object)
121 * java.util.HashSet#clear()
124 // Test for method void java.util.HashSet.clear()
134 * java.util.HashSet#clone()
137 // Test for method java.lang.Object java.util.HashSet.clone()
138 HashSet hs2 = (HashSet) hs.clone();
139 assertTrue("clone returned an equivalent HashSet", hs != hs2);
140 assertTrue("clone did not return an equal HashSet", hs.equals(hs2));
144 * java.util.HashSet#contains(java.lang.Object)
147 // Test for method boolean java.util.HashSet.contains(java.lang.Object)
152 HashSet s = new HashSet();
158 * java.util.HashSet#isEmpty()
161 // Test for method boolean java.util.HashSet.isEmpty()
162 assertTrue("Empty set returned false", new HashSet().isEmpty());
167 * java.util.HashSet#iterator()
170 // Test for method java.util.Iterator java.util.HashSet.iterator()
180 HashSet s = new HashSet();
186 * java.util.HashSet#remove(java.lang.Object)
189 // Test for method boolean java.util.HashSet.remove(java.lang.Object)
195 HashSet s = new HashSet();
202 * java.util.HashSet#size()
205 // Test for method int java.util.HashSet.size()
212 * java.util.HashSet#SerializationTest
215 HashSet<String> hs = new HashSet<String>();
226 HashSet<Integer> emptyHs = new HashSet<Integer>();
227 HashSet<Integer> cloned = (HashSet) emptyHs.clone();
232 HashSet<Integer> hs = new HashSet<>();
237 HashSet<Integer> output = new HashSet<>();
244 HashSet<String> set = new HashSet<>();
252 HashSet<String> set = new HashSet<>();
265 HashSet<String> hashSet = new HashSet<>();
268 hashSet.addAll(keys);
271 SpliteratorTester.runBasicIterationTests_unordered(hashSet.spliterator(), expectedKeys,
273 SpliteratorTester.runBasicSplitTests(hashSet, expectedKeys);
274 SpliteratorTester.testSpliteratorNPE(hashSet.spliterator());
276 assertTrue(hashSet.spliterator().hasCharacteristics(Spliterator.DISTINCT));
278 SpliteratorTester.assertSupportsTrySplit(hashSet);
291 hs = new HashSet();
311 HashSet<String> initialHs = (HashSet<String>) initial;
312 HashSet<String> deseriaHs = (HashSet<String>) deserialized;