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

Method modifyRecordId

test/simpledb/TupleTest.java:46–60  ·  view source on GitHub ↗

Unit test for Tuple.getRecordId() and Tuple.setRecordId()

()

Source from the content-addressed store, hash-verified

44 * Unit test for Tuple.getRecordId() and Tuple.setRecordId()
45 */
46 @Test public void modifyRecordId() {
47 Tuple tup1 = new Tuple(Utility.getTupleDesc(1));
48 HeapPageId pid1 = new HeapPageId(0,0);
49 RecordId rid1 = new RecordId(pid1, 0);
50 tup1.setRecordId(rid1);
51
52 try {
53 assertEquals(rid1, tup1.getRecordId());
54 } catch (java.lang.UnsupportedOperationException e) {
55 //rethrow the exception with an explanation
56 throw new UnsupportedOperationException("modifyRecordId() test failed due to " +
57 "RecordId.equals() not being implemented. This is not required for Lab 1, " +
58 "but should pass when you do implement the RecordId class.");
59 }
60 }
61
62 /**
63 * JUnit suite target

Callers

nothing calls this directly

Calls 3

getTupleDescMethod · 0.95
setRecordIdMethod · 0.95
getRecordIdMethod · 0.95

Tested by

no test coverage detected