mirror of
https://github.com/mgechev/revive.git
synced 2024-11-30 08:57:07 +02:00
22 lines
393 B
Go
22 lines
393 B
Go
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mgechev/revive/lint"
|
|
"github.com/mgechev/revive/rule"
|
|
)
|
|
|
|
func TestAddConstant(t *testing.T) {
|
|
args := []interface{}{map[string]interface{}{
|
|
"maxLitCount": "2",
|
|
"allowStrs": "\"\"",
|
|
"allowInts": "0,1,2",
|
|
"allowFloats": "0.0,1.0",
|
|
}}
|
|
|
|
testRule(t, "add-constant", &rule.AddConstantRule{}, &lint.RuleConfig{
|
|
Arguments: args,
|
|
})
|
|
}
|