Merge pull request #600 from duglin/FixTest
Fix to allow for build in different path
This commit is contained in:
commit
5f8fd8e04e
|
@ -1,6 +1,9 @@
|
|||
package stacktrace
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func captureFunc() Stacktrace {
|
||||
return Capture(0)
|
||||
|
@ -18,7 +21,8 @@ func TestCaptureTestFunc(t *testing.T) {
|
|||
if expected := "captureFunc"; frame.Function != expected {
|
||||
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
|
||||
}
|
||||
if expected := "github.com/opencontainers/runc/libcontainer/stacktrace"; frame.Package != expected {
|
||||
expected := "github.com/opencontainers/runc/libcontainer/stacktrace"
|
||||
if !strings.HasSuffix(frame.Package, expected) {
|
||||
t.Fatalf("expected package %q but received %q", expected, frame.Package)
|
||||
}
|
||||
if expected := "capture_test.go"; frame.File != expected {
|
||||
|
|
Loading…
Reference in New Issue