Unit test for HeapFile.readPage()
()
| 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 { |
nothing calls this directly
no test coverage detected