gitee.com/lonely0422/gometalinter.git@v3.0.1-0.20190307123442-32416ab75314+incompatible/regressiontests/unconvert_test.go (about) 1 package regressiontests 2 3 import "testing" 4 5 func TestUnconvert(t *testing.T) { 6 t.Parallel() 7 source := `package test 8 9 func test() { 10 var a int64 11 b := int64(a) 12 println(b) 13 }` 14 expected := Issues{ 15 {Linter: "unconvert", Severity: "warning", Path: "test.go", Line: 5, Col: 12, Message: "unnecessary conversion"}, 16 } 17 ExpectIssues(t, "unconvert", source, expected) 18 }