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

Method readPage

test/simpledb/HeapFileReadTest.java:72–82  ·  view source on GitHub ↗

Unit test for HeapFile.readPage()

()

Source from the content-addressed store, hash-verified

70 * Unit test for HeapFile.readPage()
71 */
72 @Test
73 public void readPage() {
74 HeapPageId pid = new HeapPageId(hf.getId(), 0);
75 HeapPage page = (HeapPage) hf.readPage(pid);
76
77 // NOTE(ghuo): we try not to dig too deeply into the Page API here; we
78 // rely on HeapPageTest for that. perform some basic checks.
79 assertEquals(484, page.getNumEmptySlots());
80 assertTrue(page.isSlotUsed(1));
81 assertFalse(page.isSlotUsed(20));
82 }
83
84 @Test
85 public void testIteratorBasic() throws Exception {

Callers

nothing calls this directly

Calls 4

getNumEmptySlotsMethod · 0.95
isSlotUsedMethod · 0.95
getIdMethod · 0.65
readPageMethod · 0.65

Tested by

no test coverage detected