- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for testConditional (0.15 sec)
-
src/runtime/defer_test.go
// Make sure that conditional open-coded defers are activated correctly and run in // the correct order. func TestConditionalDefers(t *testing.T) { list = make([]int, 0, 10) defer func() { if recover() != "testConditional" { t.Fatal("expected panic") } want := []int{4, 2, 1} if !reflect.DeepEqual(want, list) { t.Fatalf("wanted %v, got %v", want, list) } }() testConditionalDefers(8) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:57:24 UTC 2023 - 11.4K bytes - Viewed (0)