mirror of
https://github.com/golang/go
synced 2024-11-11 19:11:35 -07:00
test: check portable error message on issue46234.go
issue46234.go expects an error output "segmentation violation", which is UNIX-specific. Check for "nil pointer dereference" instead, which is emitted by the Go runtime and should work on all platforms. Should fix Windows builders. Change-Id: I3f5a66a687d43cae5eaf6a9e942b877e5a248900 Reviewed-on: https://go-review.googlesource.com/c/go/+/321072 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
eeadce2d87
commit
15a374d5c1
@ -96,7 +96,7 @@ func main() {
|
||||
log.Fatalf("Passed, expected an error")
|
||||
}
|
||||
|
||||
want := []byte("segmentation violation")
|
||||
want := []byte("nil pointer dereference")
|
||||
if !bytes.Contains(output, want) {
|
||||
log.Fatalf("Unmatched error message %q:\nin\n%s\nError: %v", want, output, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user