Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testCFunc_ssa (0.09 sec)

  1. src/cmd/compile/internal/test/testdata/closure_test.go

    // closure.go tests closure operations.
    package main
    
    import "testing"
    
    //go:noinline
    func testCFunc_ssa() int {
    	a := 0
    	b := func() {
    		switch {
    		}
    		a++
    	}
    	b()
    	b()
    	return a
    }
    
    func testCFunc(t *testing.T) {
    	if want, got := 2, testCFunc_ssa(); got != want {
    		t.Errorf("expected %d, got %d", want, got)
    	}
    }
    
    // TestClosure tests closure related behavior.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 572 bytes
    - Viewed (0)
Back to top