Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorj committed May 1, 2017
1 parent b169220 commit a55a1e3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func TestOutputHasNotChanged(t *testing.T) {

cmd := exec.Command("go", "generate", "./tests")
if err := cmd.Run(); err != nil {
output, _ := cmd.CombinedOutput()
t.Error(string(output))
t.Fatal(err)
}

Expand Down
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -e

function join { local IFS="$1"; shift; echo "$*"; }

go install .

echo "== Starting lint..."
gometalinter --vendored-linters --vendor --disable-all --enable=gofmt --enable=goimports --enable=gocyclo --cyclo-over=10
echo "== Finished lint."
Expand Down
2 changes: 0 additions & 2 deletions tests/dummy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package tests

//go:generate go run ../main.go Dummy --tags=!strict
//go:generate go run ../main.go Dummy --strict --tags=strict --output=dummy_result_strict.go
type Dummy struct {
ID int
}
3 changes: 2 additions & 1 deletion tests/dummy_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/hectorj/go-resultgen/tests"
)

//go:generate go-resultgen Dummy --tags=!strict

/*
// In the tests package, we have:
//go:generate go-resultgen Dummy --tags=!strict
type Dummy struct {
ID int
}
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy_strict_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/hectorj/go-resultgen/tests"
)

//go:generate go run ../main.go Dummy --strict --tags=strict --output=dummy_result_strict.go

/*
// In the tests package, we have:
//go:generate go-resultgen Dummy --strict --tags=strict --output=dummy_result_strict.go
type Dummy struct {
ID int
}
Expand Down

0 comments on commit a55a1e3

Please sign in to comment.