Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zwcn committed Mar 28, 2019
1 parent 185ba8c commit 7c37451
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 4 additions & 1 deletion go.mod
Expand Up @@ -2,4 +2,7 @@ module github.com/cheekybits/genny

go 1.12

require golang.org/x/tools v0.0.0-20190328030505-8f05a32dce9f
require (
github.com/stretchr/testify v1.3.0
golang.org/x/tools v0.0.0-20190328030505-8f05a32dce9f
)
7 changes: 7 additions & 0 deletions go.sum
@@ -1,3 +1,10 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
11 changes: 6 additions & 5 deletions parse/parse_test.go
Expand Up @@ -12,10 +12,11 @@ import (

var tests = []struct {
// input
filename string
pkgName string
in string
types []map[string]string
filename string
outputFilename string
pkgName string
in string
types []map[string]string

// expectations
expectedOut string
Expand Down Expand Up @@ -118,7 +119,7 @@ func TestParse(t *testing.T) {
test.in = contents(test.in)
test.expectedOut = contents(test.expectedOut)

bytes, err := parse.Generics(test.filename, test.pkgName, strings.NewReader(test.in), test.types)
bytes, err := parse.Generics(test.filename, test.outputFilename, test.pkgName, strings.NewReader(test.in), test.types)

// check the error
if test.expectedErr == nil {
Expand Down

0 comments on commit 7c37451

Please sign in to comment.