- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 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/testdata/testprogcgo/threadpanic_windows.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <process.h> #include <stdlib.h> #include <stdio.h> void gopanic(void); static unsigned int __attribute__((__stdcall__)) die(void* x) { gopanic(); return 0; } void start(void) { if(_beginthreadex(0, 0, die, 0, 0, 0) != 0) printf("_beginthreadex failed\n");
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 23:11:44 UTC 2016 - 435 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/threadpanic_unix.c
// license that can be found in the LICENSE file. // +build !plan9,!windows #include <stdlib.h> #include <stdio.h> #include <pthread.h> void gopanic(void); static void* die(void* x) { gopanic(); return 0; } void start(void) { pthread_t t; if(pthread_create(&t, 0, die, 0) != 0) printf("pthread_create failed\n");
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 23:34:33 UTC 2016 - 435 bytes - Viewed (0)