MCPcopy Create free account
hub / github.com/jankotek/mapdb / testEmpty

Method testEmpty

src/test/java/org/mapdb/BTreeSet3Test.java:102–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 * isEmpty is true before add, false after
101 */
102 public void testEmpty() {
103 NavigableSet q = set0();
104 assertTrue(q.isEmpty());
105 q.add(new Integer(1));
106 assertFalse(q.isEmpty());
107 q.add(new Integer(2));
108 q.pollFirst();
109 q.pollFirst();
110 assertTrue(q.isEmpty());
111 }
112
113 /*
114 * size changes when elements added and removed

Callers

nothing calls this directly

Calls 4

set0Method · 0.95
pollFirstMethod · 0.80
isEmptyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected