Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testUnconditional (0.3 sec)

  1. src/runtime/defer_test.go

    // 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
    
    // Test an open-coded defer and non-open-coded defer - make sure both defers run
    // and call recover()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:57:24 UTC 2023
    - 11.4K bytes
    - Viewed (0)
Back to top