From a158d2d9f84b4a1973db49e959e476aca996e04a Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Wed, 1 Nov 2023 04:59:28 +0100 Subject: [PATCH] more tests --- stacktrace/stacktrace.go | 4 ++-- stacktrace/stacktrace_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stacktrace/stacktrace.go b/stacktrace/stacktrace.go index a7d0b5d..0b109cf 100644 --- a/stacktrace/stacktrace.go +++ b/stacktrace/stacktrace.go @@ -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/" ) diff --git a/stacktrace/stacktrace_test.go b/stacktrace/stacktrace_test.go index 00ce645..01811ff 100644 --- a/stacktrace/stacktrace_test.go +++ b/stacktrace/stacktrace_test.go @@ -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) } @@ -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) } @@ -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")) }