Skip to content

Commit f3a1f1c

Browse files
authored
drop testify dependency (#10)
go mod download will currently overfetch including test dependencies (see golang/go#41431), so, since we barely use this dependency in our tests, we'll skip it for now
1 parent f5f4fdf commit f3a1f1c

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ module github.com/ashanbrown/makezero
22

33
go 1.12
44

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

go.sum

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
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=
81
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
92
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
103
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
3326
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
3427
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
3528
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=

makezero/makezero_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package makezero
33
import (
44
"go/parser"
55
"go/token"
6+
"reflect"
67
"testing"
7-
8-
"github.com/stretchr/testify/assert"
98
)
109

1110
func TestMakeZero(t *testing.T) {
@@ -120,11 +119,14 @@ func foo() {
120119

121120
func expectIssues(t *testing.T, linter *Linter, contents string, issues ...string) {
122121
actualIssues := parseFile(t, linter, contents)
123-
actualIssueStrs := make([]string, 0, len(actualIssues))
122+
var actualIssueStrs []string
124123
for _, i := range actualIssues {
125124
actualIssueStrs = append(actualIssueStrs, i.String())
126125
}
127-
assert.ElementsMatch(t, issues, actualIssueStrs)
126+
127+
if !reflect.DeepEqual(issues, actualIssueStrs) {
128+
t.Errorf("\nExpected:%v\nGot:%v\n", issues, actualIssueStrs)
129+
}
128130
}
129131

130132
func parseFile(t *testing.T, linter *Linter, contents string) []Issue {

0 commit comments

Comments
 (0)