MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / assertPosEqual

Function assertPosEqual

pkg/sql/ast/positions_test.go:63–69  ·  view source on GitHub ↗

assertPosEqual checks that a Location matches expected values.

(t *testing.T, label string, loc models.Location, wantLine, wantCol int)

Source from the content-addressed store, hash-verified

61
62// assertPosEqual checks that a Location matches expected values.
63func assertPosEqual(t *testing.T, label string, loc models.Location, wantLine, wantCol int) {
64 t.Helper()
65 if loc.Line != wantLine || loc.Column != wantCol {
66 t.Errorf("%s: expected line=%d col=%d, got line=%d col=%d",
67 label, wantLine, wantCol, loc.Line, loc.Column)
68 }
69}
70
71// -----------------------------------------------------------------------------
72// TestSelectStatementPosition verifies SELECT statement position

Calls 2

HelperMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected