Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestVariadicMethodValue (0.35 sec)

  1. src/reflect/all_test.go

    	}
    	m32 := ValueOf(&p).MethodByName("Int32Method").Interface().(func(int32) int32)
    	if x := m32(456); x != 456 {
    		t.Errorf("Int32Method returned %d; want 456", x)
    	}
    }
    
    func TestVariadicMethodValue(t *testing.T) {
    	p := Point{3, 4}
    	points := []Point{{20, 21}, {22, 23}, {24, 25}}
    	want := int64(p.TotalDist(points[0], points[1], points[2]))
    
    	// Variadic method of type.
    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