MCPcopy Index your code
hub / github.com/jankotek/mapdb / testEmpty

Method testEmpty

src/test/java/org/mapdb/BTreeSet2Test.java:137–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135 * isEmpty is true before add, false after
136 */
137 public void testEmpty() {
138 NavigableSet q = DBMaker.memoryDB().make().treeSet("test").create();
139 assertTrue(q.isEmpty());
140 q.add(new Integer(1));
141 assertFalse(q.isEmpty());
142 q.add(new Integer(2));
143 q.pollFirst();
144 q.pollFirst();
145 assertTrue(q.isEmpty());
146 }
147
148 /*
149 * size changes when elements added and removed

Callers

nothing calls this directly

Calls 3

pollFirstMethod · 0.80
isEmptyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected