From e091b4e7c07056e32120ab25cc9a78ed24f7c754 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 17 Apr 2019 11:38:33 -0700 Subject: Internal change. PiperOrigin-RevId: 244036529 Change-Id: I280f9632a65d2e40d844e0d5ec3a101d808434ee --- pkg/binary/binary_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/binary/binary_test.go b/pkg/binary/binary_test.go index d8d481f32..200961c70 100644 --- a/pkg/binary/binary_test.go +++ b/pkg/binary/binary_test.go @@ -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) } }() -- cgit v1.2.3