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