github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/go/analysis/passes/errorsas/errorsas_test.go (about) 1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build go1.13 6 // +build go1.13 7 8 package errorsas_test 9 10 import ( 11 "testing" 12 13 "github.com/jhump/golang-x-tools/go/analysis/analysistest" 14 "github.com/jhump/golang-x-tools/go/analysis/passes/errorsas" 15 "github.com/jhump/golang-x-tools/internal/typeparams" 16 ) 17 18 func Test(t *testing.T) { 19 testdata := analysistest.TestData() 20 tests := []string{"a"} 21 if typeparams.Enabled { 22 tests = append(tests, "typeparams") 23 } 24 analysistest.Run(t, testdata, errorsas.Analyzer, tests...) 25 }