diff options
author | Googler <noreply@google.com> | 2019-04-17 11:38:33 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-17 11:40:11 -0700 |
commit | e091b4e7c07056e32120ab25cc9a78ed24f7c754 (patch) | |
tree | dab3799ffe03fee9c9885ea82a7563f775a198bc /pkg | |
parent | 9f8c89fc7fb7c4588713eb376fa56c4c3026d43c (diff) |
Internal change.
PiperOrigin-RevId: 244036529
Change-Id: I280f9632a65d2e40d844e0d5ec3a101d808434ee
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/binary/binary_test.go | 5 |
1 files 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) } }() |