Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestAutotmpLoopDepth (0.16 sec)

  1. src/cmd/compile/internal/test/issue57434_test.go

    type Object struct {
    	Val int
    }
    
    func (o *Object) Initialize() *Object {
    	o.Val = 5
    	return o
    }
    
    func (o *Object) Update() *Object {
    	o.Val = o.Val + 1
    	return o
    }
    
    func TestAutotmpLoopDepth(t *testing.T) {
    	f := func() {
    		for i := 0; i < 10; i++ {
    			var obj Object
    			obj.Initialize().Update()
    			output = obj.Val
    		}
    	}
    	if n := testing.AllocsPerRun(10, f); n > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 20:24:18 UTC 2023
    - 619 bytes
    - Viewed (0)
Back to top