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

Method populatedSet

src/test/java/org/mapdb/BTreeSet2Test.java:34–46  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

32 * Integers 0 ... n.
33 */
34 private NavigableSet<Integer> populatedSet(int n) {
35 NavigableSet q = DBMaker.memoryDB().make().
36 treeSet("test").serializer(Serializer.INTEGER).make();
37
38 assertTrue(q.isEmpty());
39 for (int i = n-1; i >= 0; i-=2)
40 assertTrue(q.add(new Integer(i)));
41 for (int i = (n & 1); i < n; i+=2)
42 assertTrue(q.add(new Integer(i)));
43 assertFalse(q.isEmpty());
44 assertEquals(n, q.size());
45 return q;
46 }
47
48 /*
49 * Returns a new set of first 5 ints.

Callers 14

testSizeMethod · 0.95
testPollFirstMethod · 0.95
testPollLastMethod · 0.95
testRemoveElementMethod · 0.95
testContainsMethod · 0.95
testClearMethod · 0.95
testContainsAllMethod · 0.95
testRetainAllMethod · 0.95
testRemoveAllMethod · 0.95
testToArrayMethod · 0.95
testToArray2Method · 0.95
testIteratorMethod · 0.95

Calls 3

isEmptyMethod · 0.45
addMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected