Skip to content

Commit

Permalink
Release v3
Browse files Browse the repository at this point in the history
To properly support go modules we need a new import path. Following
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher the
correct way to do that seems to be to release a new major version.
  • Loading branch information
dnephin committed Feb 13, 2019
1 parent d9c679c commit 4c906a1
Show file tree
Hide file tree
Showing 43 changed files with 84 additions and 84 deletions.
6 changes: 3 additions & 3 deletions assert/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ import (
"go/token"

gocmp "github.com/google/go-cmp/cmp"
"gotest.tools/assert/cmp"
"gotest.tools/internal/format"
"gotest.tools/internal/source"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/internal/format"
"gotest.tools/v3/internal/source"
)

// BoolOrComparison can be a bool, or cmp.Comparison. See Assert() for usage.
Expand Down
2 changes: 1 addition & 1 deletion assert/assert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

gocmp "github.com/google/go-cmp/cmp"
"gotest.tools/assert/cmp"
"gotest.tools/v3/assert/cmp"
)

type fakeTestingT struct {
Expand Down
2 changes: 1 addition & 1 deletion assert/cmd/gty-migrate-from-testify/call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/token"
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestCall_String(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions assert/cmd/gty-migrate-from-testify/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"gotest.tools/assert"
"gotest.tools/env"
"gotest.tools/fs"
"gotest.tools/golden"
"gotest.tools/v3/assert"
"gotest.tools/v3/env"
"gotest.tools/v3/fs"
"gotest.tools/v3/golden"
)

func TestRun(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions assert/cmd/gty-migrate-from-testify/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"

"golang.org/x/tools/go/loader"
"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
)

func TestMigrateFileReplacesTestingT(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion assert/cmp/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/google/go-cmp/cmp"
"gotest.tools/internal/format"
"gotest.tools/v3/internal/format"
)

// Comparison is a function which compares values and returns ResultSuccess if
Expand Down
2 changes: 1 addition & 1 deletion assert/cmp/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func TestError(t *testing.T) {
assertFailureHasPrefix(t, result,
`expected error "the error message", got "wrapped: other"
other
gotest.tools/assert/cmp.TestError`)
gotest.tools`)

msg := "the message"
result = Error(errors.New(msg), msg)()
Expand Down
2 changes: 1 addition & 1 deletion assert/cmp/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"go/ast"
"text/template"

"gotest.tools/internal/source"
"gotest.tools/v3/internal/source"
)

// A Result of a Comparison.
Expand Down
4 changes: 2 additions & 2 deletions assert/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"testing"

"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
)

var t = &testing.T{}
Expand Down
2 changes: 1 addition & 1 deletion assert/opt/opt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

gocmp "github.com/google/go-cmp/cmp"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestDurationWithThreshold(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions assert/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"go/ast"

"gotest.tools/assert/cmp"
"gotest.tools/internal/format"
"gotest.tools/internal/source"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/internal/format"
"gotest.tools/v3/internal/source"
)

func runComparison(
Expand Down
4 changes: 2 additions & 2 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"strings"

"gotest.tools/assert"
"gotest.tools/x/subtest"
"gotest.tools/v3/assert"
"gotest.tools/v3/x/subtest"
)

type helperT interface {
Expand Down
6 changes: 3 additions & 3 deletions env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"sort"
"testing"

"gotest.tools/assert"
"gotest.tools/fs"
"gotest.tools/skip"
"gotest.tools/v3/assert"
"gotest.tools/v3/fs"
"gotest.tools/v3/skip"
)

func TestPatchFromUnset(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions fs/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"testing"

"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/fs"
"gotest.tools/golden"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/fs"
"gotest.tools/v3/golden"
)

var t = &testing.T{}
Expand Down
4 changes: 2 additions & 2 deletions fs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"runtime"
"strings"

"gotest.tools/assert"
"gotest.tools/x/subtest"
"gotest.tools/v3/assert"
"gotest.tools/v3/x/subtest"
)

// Path objects return their filesystem path. Path may be implemented by a
Expand Down
4 changes: 2 additions & 2 deletions fs/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"os"
"testing"

"gotest.tools/assert"
"gotest.tools/fs"
"gotest.tools/v3/assert"
"gotest.tools/v3/fs"
)

func TestNewDirWithOpsAndManifestEqual(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fs/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"

"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

// Manifest stores the expected structure and properties of files and directories
Expand Down
2 changes: 1 addition & 1 deletion fs/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestManifestFromDir(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fs/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

const defaultFileMode = 0644
Expand Down
4 changes: 2 additions & 2 deletions fs/ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

"gotest.tools/assert"
"gotest.tools/fs"
"gotest.tools/v3/assert"
"gotest.tools/v3/fs"
)

func TestFromDir(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fs/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io/ioutil"
"os"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

// resourcePath is an adaptor for resources so they can be used as a Path
Expand Down
4 changes: 2 additions & 2 deletions fs/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sort"
"strings"

"gotest.tools/assert/cmp"
"gotest.tools/internal/format"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/internal/format"
)

// Equal compares a directory to the expected structured described by a manifest
Expand Down
6 changes: 3 additions & 3 deletions fs/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"runtime"
"testing"

"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
"gotest.tools/v3/skip"
)

func TestEqualMissingRoot(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module gotest.tools
module gotest.tools/v3

require (
github.com/google/go-cmp v0.2.0
github.com/pkg/errors v0.8.0
github.com/spf13/pflag v1.0.3
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d
golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d h1:/VmFqYLs4Kit6ncc9mRWBGPNlBVSusq3xA7p41/7JoY=
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1 h1:EAPsk8kfGCjxQagrkWjzXlUWe2p3gj5MknO+z2o9GKc=
golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
4 changes: 2 additions & 2 deletions golden/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package golden_test
import (
"testing"

"gotest.tools/assert"
"gotest.tools/golden"
"gotest.tools/v3/assert"
"gotest.tools/v3/golden"
)

var t = &testing.T{}
Expand Down
6 changes: 3 additions & 3 deletions golden/golden.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"io/ioutil"
"path/filepath"

"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/internal/format"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/internal/format"
)

var flagUpdate = flag.Bool("test.update-golden", false, "update golden file")
Expand Down
6 changes: 3 additions & 3 deletions golden/golden_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path/filepath"
"testing"

"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/fs"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
"gotest.tools/v3/fs"
)

type fakeT struct {
Expand Down
4 changes: 2 additions & 2 deletions icmd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"sync"
"time"

"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
)

type helperT interface {
Expand Down
8 changes: 4 additions & 4 deletions icmd/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"testing"
"time"

"gotest.tools/assert"
"gotest.tools/fs"
"gotest.tools/golden"
"gotest.tools/internal/maint"
"gotest.tools/v3/assert"
"gotest.tools/v3/fs"
"gotest.tools/v3/golden"
"gotest.tools/v3/internal/maint"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion icmd/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package icmd_test
import (
"testing"

"gotest.tools/icmd"
"gotest.tools/v3/icmd"
)

var t = &testing.T{}
Expand Down
2 changes: 1 addition & 1 deletion internal/format/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"unicode"

"gotest.tools/internal/difflib"
"gotest.tools/v3/internal/difflib"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/format/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package format_test
import (
"testing"

"gotest.tools/assert"
"gotest.tools/golden"
"gotest.tools/internal/format"
"gotest.tools/v3/assert"
"gotest.tools/v3/golden"
"gotest.tools/v3/internal/format"
)

func TestUnifiedDiff(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/format/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package format_test
import (
"testing"

"gotest.tools/assert"
"gotest.tools/internal/format"
"gotest.tools/v3/assert"
"gotest.tools/v3/internal/format"
)

func TestMessage(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions internal/source/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strings"
"testing"

"gotest.tools/assert"
"gotest.tools/internal/source"
"gotest.tools/skip"
"gotest.tools/v3/assert"
"gotest.tools/v3/internal/source"
"gotest.tools/v3/skip"
)

func TestFormattedCallExprArg_SingleLine(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion poll/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestWaitOnFile(t *testing.T) {
Expand Down
Loading

0 comments on commit 4c906a1

Please sign in to comment.