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

Function assertPos

pkg/sql/ast/positions_test.go:55–60  ·  view source on GitHub ↗

assertPos checks that a Location is non-zero (has been populated).

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

Source from the content-addressed store, hash-verified

53
54// assertPos checks that a Location is non-zero (has been populated).
55func assertPos(t *testing.T, label string, loc models.Location) {
56 t.Helper()
57 if loc.Line == 0 && loc.Column == 0 {
58 t.Errorf("%s: expected non-zero position, got line=%d col=%d", label, loc.Line, loc.Column)
59 }
60}
61
62// assertPosEqual checks that a Location matches expected values.
63func assertPosEqual(t *testing.T, label string, loc models.Location, wantLine, wantCol int) {

Calls 2

HelperMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected