diff options
Diffstat (limited to 'libgo/go/runtime/checkptr_test.go')
-rw-r--r-- | libgo/go/runtime/checkptr_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libgo/go/runtime/checkptr_test.go b/libgo/go/runtime/checkptr_test.go index ab3058f7336..0ca7b20cfd4 100644 --- a/libgo/go/runtime/checkptr_test.go +++ b/libgo/go/runtime/checkptr_test.go @@ -28,7 +28,8 @@ func TestCheckPtr(t *testing.T) { cmd string want string }{ - {"CheckPtrAlignment", "fatal error: checkptr: unsafe pointer conversion\n"}, + {"CheckPtrAlignmentPtr", "fatal error: checkptr: unsafe pointer conversion\n"}, + {"CheckPtrAlignmentNoPtr", ""}, {"CheckPtrArithmetic", "fatal error: checkptr: unsafe pointer arithmetic\n"}, {"CheckPtrSize", "fatal error: checkptr: unsafe pointer conversion\n"}, {"CheckPtrSmall", "fatal error: checkptr: unsafe pointer arithmetic\n"}, @@ -42,6 +43,12 @@ func TestCheckPtr(t *testing.T) { if err != nil { t.Log(err) } + if tc.want == "" { + if len(got) > 0 { + t.Errorf("output:\n%s\nwant no output", got) + } + return + } if !strings.HasPrefix(string(got), tc.want) { t.Errorf("output:\n%s\n\nwant output starting with: %s", got, tc.want) } |