- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestUnconditionalPanic (0.27 sec)
-
src/runtime/defer_test.go
package runtime_test import ( "reflect" "runtime" "testing" ) // Make sure open-coded defer exit code is not lost, even when there is an // unconditional panic (hence no return from the function) func TestUnconditionalPanic(t *testing.T) { defer func() { if recover() != "testUnconditional" { t.Fatal("expected unconditional panic") } }() panic("testUnconditional") } var glob int = 3
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:57:24 UTC 2023 - 11.4K bytes - Viewed (0)