Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Nov 1, 2023
1 parent ae119a3 commit a158d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions stacktrace/stacktrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
/// -> Apache 2.0 LICENSE
///

type fake struct{}
// type fake struct{}

var (
// packageName = reflect.TypeOf(fake{}).PkgPath()
packageName = "samber/do"
packageName = "do"
packageNameStacktrace = packageName + "/stacktrace/"
packageNameExamples = packageName + "/examples/"
)
Expand Down
6 changes: 3 additions & 3 deletions stacktrace/stacktrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestStacktrace(t *testing.T) {
is.True(ok)
is.NotNil(frame)
is.NotEmpty(frame)
is.True(strings.HasSuffix(frame.File, "github.com/samber/do/stacktrace/stacktrace_test.go"))
is.True(strings.HasSuffix(frame.File, "do/stacktrace/stacktrace_test.go"))
is.Equal("example1", frame.Function)
is.Equal(12, frame.Line)
}
Expand All @@ -39,7 +39,7 @@ func TestNewFrameFromPtr(t *testing.T) {
is.True(ok)
is.NotNil(frame)
is.NotEmpty(frame)
is.True(strings.HasSuffix(frame.File, "github.com/samber/do/stacktrace/stacktrace_test.go"))
is.True(strings.HasSuffix(frame.File, "do/stacktrace/stacktrace_test.go"))
is.Equal("provider", frame.Function)
is.Equal(16, frame.Line)
}
Expand All @@ -51,5 +51,5 @@ func TestFrame_String(t *testing.T) {
is.True(ok)
is.NotNil(frame)
is.NotEmpty(frame)
is.True(strings.Contains(frame.String(), "github.com/samber/do/stacktrace/stacktrace_test.go:example1:12"))
is.True(strings.Contains(frame.String(), "do/stacktrace/stacktrace_test.go:example1:12"))
}

0 comments on commit a158d2d

Please sign in to comment.