MCPcopy
hub / github.com/grafana/tempo / TestSpansetExpressionErrors

Function TestSpansetExpressionErrors

pkg/traceql/parse_test.go:569–584  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

567}
568
569func TestSpansetExpressionErrors(t *testing.T) {
570 tests := []struct {
571 in string
572 err error
573 }{
574 {in: "{ true } &&", err: newParseError("syntax error: unexpected $end, expecting { or (", 1, 12)},
575 }
576
577 for _, tc := range tests {
578 t.Run(tc.in, func(t *testing.T) {
579 _, err := Parse(tc.in)
580
581 require.Equal(t, tc.err, err)
582 })
583 }
584}
585
586func TestSpansetExpressionPrecedence(t *testing.T) {
587 tests := []struct {

Callers

nothing calls this directly

Calls 4

newParseErrorFunction · 0.85
ParseFunction · 0.85
RunMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected