File tree 3 files changed +7
-19
lines changed 3 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,4 @@ module github.com/ashanbrown/makezero
2
2
3
3
go 1.12
4
4
5
- require (
6
- github.com/stretchr/testify v1.4.0
7
- golang.org/x/tools v0.1.9
8
- )
5
+ require golang.org/x/tools v0.1.9
Original file line number Diff line number Diff line change 1
- github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
2
- github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
3
- github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
4
- github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
5
- github.com/stretchr/objx v0.1.0 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
6
- github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk =
7
- github.com/stretchr/testify v1.4.0 /go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4 =
8
1
github.com/yuin/goldmark v1.4.1 /go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k =
9
2
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 /go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w =
10
3
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 /go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI =
@@ -33,7 +26,3 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
33
26
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 /go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0 =
34
27
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE =
35
28
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 /go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0 =
36
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
37
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
38
- gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw =
39
- gopkg.in/yaml.v2 v2.2.2 /go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI =
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ package makezero
3
3
import (
4
4
"go/parser"
5
5
"go/token"
6
+ "reflect"
6
7
"testing"
7
-
8
- "github.com/stretchr/testify/assert"
9
8
)
10
9
11
10
func TestMakeZero (t * testing.T ) {
@@ -120,11 +119,14 @@ func foo() {
120
119
121
120
func expectIssues (t * testing.T , linter * Linter , contents string , issues ... string ) {
122
121
actualIssues := parseFile (t , linter , contents )
123
- actualIssueStrs := make ( []string , 0 , len ( actualIssues ))
122
+ var actualIssueStrs []string
124
123
for _ , i := range actualIssues {
125
124
actualIssueStrs = append (actualIssueStrs , i .String ())
126
125
}
127
- assert .ElementsMatch (t , issues , actualIssueStrs )
126
+
127
+ if ! reflect .DeepEqual (issues , actualIssueStrs ) {
128
+ t .Errorf ("\n Expected:%v\n Got:%v\n " , issues , actualIssueStrs )
129
+ }
128
130
}
129
131
130
132
func parseFile (t * testing.T , linter * Linter , contents string ) []Issue {
You can’t perform that action at this time.
0 commit comments