Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIndex (0.08 sec)

  1. src/reflect/all_test.go

    		}
    	})
    }
    
    func TestSmallNegativeInt(t *testing.T) {
    	i := int16(-1)
    	v := ValueOf(i)
    	if v.Int() != -1 {
    		t.Errorf("int16(-1).Int() returned %v", v.Int())
    	}
    }
    
    func TestIndex(t *testing.T) {
    	xs := []byte{1, 2, 3, 4, 5, 6, 7, 8}
    	v := ValueOf(xs).Index(3).Interface().(byte)
    	if v != xs[3] {
    		t.Errorf("xs.Index(3) = %v; expected %v", v, xs[3])
    	}
    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