diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2014-10-09 17:24:34 +1100 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2014-10-09 17:24:34 +1100 |
commit | 76b3936b738289481b81b6a520c4f03aef6afcf1 (patch) | |
tree | b9a1c98248d5e40c19aea46dc6cc94cea6398c6c /src/runtime/syscall_windows_test.go | |
parent | 01fd182471a4a06c5bdfb3184c4559fb8929bfd3 (diff) | |
download | go-76b3936b738289481b81b6a520c4f03aef6afcf1.tar.gz |
undo CL 145150043 / 8b3d26697b8d
That was complete failure - builders are broken,
but original cl worked fine on my system.
I will need access to builders
to test this change properly.
??? original CL description
runtime: handle all windows exception
Fixes issue 8006.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://codereview.appspot.com/145150043
???
TBR=rsc
R=golang-codereviews
CC=golang-codereviews
https://codereview.appspot.com/154180043
Diffstat (limited to 'src/runtime/syscall_windows_test.go')
-rw-r--r-- | src/runtime/syscall_windows_test.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go index ce8a9ec1b..9ed016ccc 100644 --- a/src/runtime/syscall_windows_test.go +++ b/src/runtime/syscall_windows_test.go @@ -494,42 +494,3 @@ func TestOutputDebugString(t *testing.T) { p := syscall.StringToUTF16Ptr("testing OutputDebugString") d.Proc("OutputDebugStringW").Call(uintptr(unsafe.Pointer(p))) } - -func TestRaiseException(t *testing.T) { - o := executeTest(t, raiseExceptionSource, nil) - if strings.Contains(o, "RaiseException should not return") { - t.Fatalf("RaiseException did not crash program: %v", o) - } - if !strings.Contains(o, "Exception 0xbad") { - t.Fatalf("No stack trace: %v", o) - } -} - -const raiseExceptionSource = ` -package main -import "syscall" -func main() { - const EXCEPTION_NONCONTINUABLE = 1 - mod := syscall.MustLoadDLL("kernel32.dll") - proc := mod.MustFindProc("RaiseException") - proc.Call(0xbad, EXCEPTION_NONCONTINUABLE, 0, 0) - println("RaiseException should not return") -} -` - -func TestZeroDivisionException(t *testing.T) { - o := executeTest(t, zeroDivisionExceptionSource, nil) - if !strings.Contains(o, "panic: runtime error: integer divide by zero") { - t.Fatalf("No stack trace: %v", o) - } -} - -const zeroDivisionExceptionSource = ` -package main -func main() { - x := 1 - y := 0 - z := x / y - println(z) -} -` |