Skip to content

Commit

Permalink
pwd
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jun 4, 2020
1 parent 1f30096 commit 045ea5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package errors

import (
"fmt"
"os"
"testing"
)

Expand All @@ -11,18 +10,17 @@ const (
===> errors stack:
github.com/qiniu/x/errors.TestFrame()
/Users/xushiwei/gop/x/errors/errors_test.go:11 errNotFound := New("not found")
/Users/xsw/qiniu/x/errors/errors_test.go:11 errNotFound := New("not found")
github.com/qiniu/x/errors.TestFrame()
/Users/xushiwei/gop/x/errors/errors_test.go:12 err1 := Frame(errNotFound, ...)
/Users/xsw/qiniu/x/errors/errors_test.go:12 err1 := Frame(errNotFound, ...)
`

s2Exp = `not found`
s3Exp = `"not found"`
)

func TestFrame(t *testing.T) {
file, _ := os.Getwd()
file += "/errors_test.go"
file := "/Users/xsw/qiniu/x/errors/errors_test.go"
errNotFound := New("not found")
err1 := NewFrame(errNotFound, `errNotFound := New("not found")`, file, 11, "github.com/qiniu/x/errors", "TestFrame", t)
err2 := NewFrame(err1, `err1 := Frame(errNotFound, ...)`, file, 12, "github.com/qiniu/x/errors", "TestFrame", t)
Expand Down
4 changes: 1 addition & 3 deletions errors/go113_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
package errors

import (
"os"
"testing"
)

func TestGo113(t *testing.T) {
file, _ := os.Getwd()
file += "/errors_test.go"
file := "/Users/xsw/qiniu/x/errors/errors_test.go"
errNotFound := New("not found")
err1 := NewFrame(errNotFound, `errNotFound := New("not found")`, file, 11, "github.com/qiniu/x/errors", "TestFrame", t)
err2 := NewFrame(err1, `err1 := Frame(errNotFound, ...)`, file, 12, "github.com/qiniu/x/errors", "TestFrame", t)
Expand Down

0 comments on commit 045ea5a

Please sign in to comment.