- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for doPanic (0.11 sec)
-
src/testing/helperfuncs_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 17:24:47 UTC 2023 - 2.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go
} func TestTimeout(t *testing.T) { origReallyCrash := runtime.ReallyCrash runtime.ReallyCrash = false defer func() { runtime.ReallyCrash = origReallyCrash }() sendResponse := make(chan string, 1) doPanic := make(chan interface{}, 1) writeErrors := make(chan error, 1) gotPanic := make(chan interface{}, 1) timeout := make(chan time.Time, 1) resp := "test response"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 18.4K bytes - Viewed (0) -
src/runtime/defer_test.go
foo.element.z = 4 defer func(element bigStruct) { save3 = element.z }(foo.element) defer func(element bigStruct) { save4 = element.z }(sideeffect2(foo).element) } //go:noinline func doPanic() { panic("Test panic") } func TestDeferForFuncWithNoExit(t *testing.T) { cond := 1 defer func() { if cond != 2 { t.Fatalf("cond: wanted 2, got %v", cond) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:57:24 UTC 2023 - 11.4K bytes - Viewed (0) -
src/text/template/exec_test.go
funcs := map[string]any{ "doPanic": func() string { panic("custom panic string") }, } tests := []struct { name string input string data any wantErr string }{ { "direct func call panics", "{{doPanic}}", (*T)(nil), `template: t:1:2: executing "t" at <doPanic>: error calling doPanic: custom panic string`, }, {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 60.1K bytes - Viewed (0) -
src/html/template/exec_test.go
funcs := map[string]any{ "doPanic": func() string { panic("custom panic string") }, } tests := []struct { name string input string data any wantErr string }{ { "direct func call panics", "{{doPanic}}", (*T)(nil), `template: t:1:2: executing "t" at <doPanic>: error calling doPanic: custom panic string`, }, {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 57.6K bytes - Viewed (0) -
src/testing/fuzz.go
f.signal <- true } }() // If we recovered a panic or inappropriate runtime.Goexit, fail the test, // flush the output log up to the root, then panic. doPanic := func(err any) { f.Fail() if r := f.runCleanup(recoverAndReturnPanic); r != nil { f.Logf("cleanup panicked with %v", r) } for root := &f.common; root.parent != nil; root = root.parent {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 22.9K bytes - Viewed (0) -
src/testing/testing.go
// reported to the user. See issue 41479. if didPanic { return } if err != nil { panic(err) } running.Delete(t.name) t.signal <- signal }() doPanic := func(err any) { t.Fail() if r := t.runCleanup(recoverAndReturnPanic); r != nil { t.Logf("cleanup panicked with %v", r) } // Flush the output log up to the root before dying.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 76.1K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/threadpanic.go
package main // void start(void); import "C" func init() { register("CgoExternalThreadPanic", CgoExternalThreadPanic) } func CgoExternalThreadPanic() { C.start() select {} } //export gopanic func gopanic() { panic("BOOM")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 428 bytes - Viewed (0) -
src/runtime/runtime-seh_windows_test.go
if runtime.GOARCH != "amd64" { t.Skip("skipping amd64-only test") } want := []string{"runtime_test.sehCallers", "runtime_test.TestSehUnwindDoublePanic.func1.1", "runtime.gopanic", "runtime_test.TestSehUnwindDoublePanic.func1", "runtime.gopanic", "runtime_test.TestSehUnwindDoublePanic"} defer func() { defer func() { if recover() == nil { t.Fatal("did not panic") } pcs := sehCallers()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 16:52:06 UTC 2023 - 4.7K bytes - Viewed (0) -
src/runtime/callers_test.go
// Make sure we don't have any extra frames on the stack (due to // open-coded defer processing) want := []string{"runtime.Callers", "runtime_test.TestCallersDoublePanic.func1.1", "runtime.gopanic", "runtime_test.TestCallersDoublePanic.func1", "runtime.gopanic", "runtime_test.TestCallersDoublePanic"} defer func() { defer func() { pcs := make([]uintptr, 20) pcs = pcs[:runtime.Callers(0, pcs)] if recover() == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 21:36:31 UTC 2023 - 12.1K bytes - Viewed (0)