MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / rewind

Method rewind

test/simpledb/JoinTest.java:77–91  ·  view source on GitHub ↗

Unit test for Join.rewind()

()

Source from the content-addressed store, hash-verified

75 * Unit test for Join.rewind()
76 */
77 @Test public void rewind() throws Exception {
78 JoinPredicate pred = new JoinPredicate(0, Predicate.Op.EQUALS, 0);
79 Join op = new Join(pred, scan1, scan2);
80 op.open();
81 while (op.hasNext()) {
82 assertNotNull(op.next());
83 }
84 assertTrue(TestUtil.checkExhausted(op));
85 op.rewind();
86
87 eqJoin.open();
88 Tuple expected = eqJoin.next();
89 Tuple actual = op.next();
90 assertTrue(TestUtil.compareTuples(expected, actual));
91 }
92
93 /**
94 * Unit test for Join.getNext() using a > predicate

Callers

nothing calls this directly

Calls 7

openMethod · 0.95
checkExhaustedMethod · 0.95
rewindMethod · 0.95
compareTuplesMethod · 0.95
hasNextMethod · 0.65
nextMethod · 0.65
openMethod · 0.65

Tested by

no test coverage detected