Internal change.

PiperOrigin-RevId: 244036529
Change-Id: I280f9632a65d2e40d844e0d5ec3a101d808434ee
This commit is contained in:
Googler
2019-04-17 11:40:11 -07:00
committed by Shentubot
parent 9f8c89fc7f
commit e091b4e7c0
+3 -2
View File
@@ -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)
}
}()