mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Internal change.
PiperOrigin-RevId: 244036529 Change-Id: I280f9632a65d2e40d844e0d5ec3a101d808434ee
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -55,8 +56,8 @@ func TestPanic(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
if got := fmt.Sprint(r); got != test.want {
|
||||
t.Errorf("Got recover() = %q, want = %q", got, test.want)
|
||||
if got := fmt.Sprint(r); !strings.HasPrefix(got, test.want) {
|
||||
t.Errorf("Got recover() = %q, want prefix = %q", got, test.want)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user