Ensure that a page is added to a transaction's freelist.
(t *testing.T)
| 22 | |
| 23 | // Ensure that a page is added to a transaction's freelist. |
| 24 | func TestFreelist_free(t *testing.T) { |
| 25 | f := newTestFreelist() |
| 26 | f.Free(100, common.NewPage(12, 0, 0, 0)) |
| 27 | if !reflect.DeepEqual([]common.Pgid{12}, f.pendingPageIds()[100].ids) { |
| 28 | t.Fatalf("exp=%v; got=%v", []common.Pgid{12}, f.pendingPageIds()[100].ids) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // Ensure that a page and its overflow is added to a transaction's freelist. |
| 33 | func TestFreelist_free_overflow(t *testing.T) { |
nothing calls this directly
no test coverage detected