Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMakeFuncInterface (0.27 sec)

  1. src/reflect/all_test.go

    		t.Errorf("Call returned %d, %d, %d, %v, %d, %g, %d; want 10, 20, 30, [40, 50], 60, 70, 80", i, j, k, l, m, n, o)
    	}
    }
    
    func TestMakeFuncInterface(t *testing.T) {
    	fn := func(i int) int { return i }
    	incr := func(in []Value) []Value {
    		return []Value{ValueOf(int(in[0].Int() + 1))}
    	}
    	fv := MakeFunc(TypeOf(fn), incr)
    	ValueOf(&fn).Elem().Set(fv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top