- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestDeferPtrs (0.13 sec)
-
src/runtime/stack_test.go
if n == 0 { cb() return } f(n - 1) } for i := 0; i < 1<<10; i++ { f(i) } } // TestDeferPtrs tests the adjustment of Defer's argument pointers (p aka &y) // during a stack copy. func set(p *int, x int) { *p = x } func TestDeferPtrs(t *testing.T) { var y int defer func() { if y != 42 { t.Errorf("defer's stack references were not adjusted appropriately")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 23.1K bytes - Viewed (0)