(t *testing.T)
| 488 | } |
| 489 | |
| 490 | func TestGroupCoalesceErrors(t *testing.T) { |
| 491 | tests := []struct { |
| 492 | in string |
| 493 | err error |
| 494 | }{ |
| 495 | {in: "by(.a) && { .b }", err: newParseError("syntax error: unexpected &&, expecting with", 0, 8)}, |
| 496 | {in: "by()", err: newParseError("syntax error: unexpected )", 1, 4)}, |
| 497 | {in: "coalesce()", err: newParseError("syntax error: unexpected coalesce", 1, 1)}, |
| 498 | } |
| 499 | |
| 500 | for _, tc := range tests { |
| 501 | t.Run(tc.in, func(t *testing.T) { |
| 502 | _, err := Parse(tc.in) |
| 503 | |
| 504 | require.Equal(t, tc.err, err) |
| 505 | }) |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | func TestGroupCoalesceOperation(t *testing.T) { |
| 510 | tests := []struct { |
nothing calls this directly
no test coverage detected