Ensure that a page and its overflow is added to a transaction's freelist.
(t *testing.T)
| 31 | |
| 32 | // Ensure that a page and its overflow is added to a transaction's freelist. |
| 33 | func TestFreelist_free_overflow(t *testing.T) { |
| 34 | f := newTestFreelist() |
| 35 | f.Free(100, common.NewPage(12, 0, 0, 3)) |
| 36 | if exp := []common.Pgid{12, 13, 14, 15}; !reflect.DeepEqual(exp, f.pendingPageIds()[100].ids) { |
| 37 | t.Fatalf("exp=%v; got=%v", exp, f.pendingPageIds()[100].ids) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // Ensure that double freeing a page is causing a panic |
| 42 | func TestFreelist_free_double_free_panics(t *testing.T) { |
nothing calls this directly
no test coverage detected