github.com/azazeal/revive@v1.0.9/test/add-constant_test.go (about) 1 package test 2 3 import ( 4 "testing" 5 6 "github.com/azazeal/revive/lint" 7 "github.com/azazeal/revive/rule" 8 ) 9 10 func TestAddConstant(t *testing.T) { 11 args := []interface{}{map[string]interface{}{ 12 "maxLitCount": "2", 13 "allowStrs": "\"\"", 14 "allowInts": "0,1,2", 15 "allowFloats": "0.0,1.0", 16 }} 17 18 testRule(t, "add-constant", &rule.AddConstantRule{}, &lint.RuleConfig{ 19 Arguments: args, 20 }) 21 }