@Test
	public void testClear() {
		WeakSet<String> weakSet = WeakDataStructureFactory.createCopyOnWriteWeakSet();

		String[] values = { "one", "two", "three" };

		for (String value : values) {
			weakSet.add(value);
		}

		assertTrue("The weak set does not contain the correct number of " +
			"elements after calling add().", (values.length == weakSet.size()));

		weakSet.clear();

		assertTrue("The weak set does not have 0 elements after calling " + "clear().",
			(weakSet.size() == 0));

		assertTrue("WeakSet.isEmpty() did not return true when the set is " + "empty.",
			weakSet.isEmpty());
	}
Tests the {@link WeakSet} class.


@since  Tracker Id 522
Ghidra/Framework/Generic/src/test/java/ghidra/util/datastruct/WeakSetTest.java