(t *testing.T)
| 757 | } |
| 758 | |
| 759 | func TestCheck_AsBool(t *testing.T) { |
| 760 | tree, err := parser.Parse(`1+2`) |
| 761 | require.NoError(t, err) |
| 762 | |
| 763 | config := &conf.Config{} |
| 764 | expr.AsBool()(config) |
| 765 | |
| 766 | _, err = checker.Check(tree, config) |
| 767 | assert.Error(t, err) |
| 768 | assert.Equal(t, "expected bool, but got int", err.Error()) |
| 769 | } |
| 770 | |
| 771 | func TestCheck_AsInt64(t *testing.T) { |
| 772 | tree, err := parser.Parse(`true`) |
nothing calls this directly
no test coverage detected
searching dependent graphs…