forked from rockleeprc/sourcecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHashSetTest.java
More file actions
31 lines (30 loc) · 742 Bytes
/
HashSetTest.java
File metadata and controls
31 lines (30 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//: annotations/HashSetTest.java
package annotations;
import java.util.*;
import net.mindview.atunit.*;
import net.mindview.util.*;
public class HashSetTest {
HashSet<String> testObject = new HashSet<String>();
@Test void initialization() {
assert testObject.isEmpty();
}
@Test void _contains() {
testObject.add("one");
assert testObject.contains("one");
}
@Test void _remove() {
testObject.add("one");
testObject.remove("one");
assert testObject.isEmpty();
}
public static void main(String[] args) throws Exception {
OSExecute.command(
"java net.mindview.atunit.AtUnit HashSetTest");
}
} /* Output:
annotations.HashSetTest
. initialization
. _remove
. _contains
OK (3 tests)
*///:~