(t *testing.T)
| 250 | } |
| 251 | |
| 252 | func TestValidateRegexProgramSizeLimitToConfig(t *testing.T) { |
| 253 | val := ValidateRegexProgramSizeLimit(5) |
| 254 | cfg := val.(ConfigurableASTValidator).ToConfig() |
| 255 | if cfg.Name != regexProgramSizeLimitValidatorName { |
| 256 | t.Errorf("ToConfig().Name = %s, wanted %s", cfg.Name, regexProgramSizeLimitValidatorName) |
| 257 | } |
| 258 | if limit, ok := cfg.ConfigValue("limit"); !ok || limit != 5 { |
| 259 | t.Errorf("ToConfig().ConfigValue('limit') = %v, wanted 5", limit) |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | func TestValidateRegexProgramSizeLimitFactory(t *testing.T) { |
| 264 | val := ValidateRegexProgramSizeLimit(5) |
nothing calls this directly
no test coverage detected