(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestRecordAssignsMonotonicIDs(t *testing.T) { |
| 28 | debug.SetEnabled(true) |
| 29 | t.Cleanup(func() { debug.SetEnabled(false) }) |
| 30 | debug.Clear() |
| 31 | |
| 32 | id1 := debug.Record("src", debug.LevelInfo, "a") |
| 33 | id2 := debug.Record("src", debug.LevelInfo, "b") |
| 34 | id3 := debug.Record("src", debug.LevelInfo, "c") |
| 35 | |
| 36 | if id1 == 0 { |
| 37 | t.Error("Record returned 0 while enabled") |
| 38 | } |
| 39 | if id2 != id1+1 || id3 != id2+1 { |
| 40 | t.Errorf("IDs not sequential: %d, %d, %d", id1, id2, id3) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func TestSnapshotReturnsCopy(t *testing.T) { |
| 45 | debug.SetEnabled(true) |
nothing calls this directly
no test coverage detected