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

Method getId

test/simpledb/HeapFileReadTest.java:41–51  ·  view source on GitHub ↗

Unit test for HeapFile.getId()

()

Source from the content-addressed store, hash-verified

39 * Unit test for HeapFile.getId()
40 */
41 @Test
42 public void getId() throws Exception {
43 int id = hf.getId();
44
45 // NOTE(ghuo): the value could be anything. test determinism, at least.
46 assertEquals(id, hf.getId());
47 assertEquals(id, hf.getId());
48
49 HeapFile other = SystemTestUtil.createRandomHeapFile(1, 1, null, null);
50 assertTrue(id != other.getId());
51 }
52
53 /**
54 * Unit test for HeapFile.getTupleDesc()

Callers

nothing calls this directly

Calls 3

createRandomHeapFileMethod · 0.95
getIdMethod · 0.95
getIdMethod · 0.65

Tested by

no test coverage detected