}
v.Index(i).Set(elem)
}
+ case reflect.Array:
+ for i := 0; i < v.Len(); i++ {
+ elem, ok := Value(concrete.Elem(), rand)
+ if !ok {
+ return reflect.Value{}, false
+ }
+ v.Index(i).Set(elem)
+ }
case reflect.String:
numChars := rand.Intn(complexSize)
codePoints := make([]rune, numChars)
func fIntptrAlias(a TestIntptrAlias) TestIntptrAlias { return a }
+func fArray(a [4]byte) [4]byte { return a }
+
+type TestArrayAlias [4]byte
+
+func fArrayAlias(a TestArrayAlias) TestArrayAlias { return a }
+
func reportError(property string, err error, t *testing.T) {
if err != nil {
t.Errorf("%s: %s", property, err)
reportError("fUintptrAlias", CheckEqual(fUintptrAlias, fUintptrAlias, nil), t)
reportError("fIntptr", CheckEqual(fIntptr, fIntptr, nil), t)
reportError("fIntptrAlias", CheckEqual(fIntptrAlias, fIntptrAlias, nil), t)
+ reportError("fArray", CheckEqual(fArray, fArray, nil), t)
+ reportError("fArrayAlais", CheckEqual(fArrayAlias, fArrayAlias, nil), t)
}
// This tests that ArbitraryValue is working by checking that all the arbitrary