(t *testing.T, label string, got, want []cursorRow)
| 50 | } |
| 51 | |
| 52 | func assertCursorRows(t *testing.T, label string, got, want []cursorRow) { |
| 53 | t.Helper() |
| 54 | if len(got) != len(want) { |
| 55 | t.Fatalf("%s: got %d rows %v, want %d rows %v", label, len(got), got, len(want), want) |
| 56 | } |
| 57 | for i := range want { |
| 58 | if got[i] != want[i] { |
| 59 | t.Errorf("%s: row %d = %+v, want %+v", label, i, got[i], want[i]) |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // fetchCursorRows runs a FETCH/MOVE statement on the transaction's connection |
| 65 | // (lib/pq sends it via the simple query protocol) and collects any rows it |
no outgoing calls
no test coverage detected