- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ValueFuzz (1.85 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go
limitations under the License. */ package fuzzer import ( "reflect" ) // ValueFuzz recursively changes all basic type values in an object. Any kind of references will not // be touch, i.e. the addresses of slices, maps, pointers will stay unchanged. func ValueFuzz(obj interface{}) { valueFuzz(reflect.ValueOf(obj)) } func valueFuzz(obj reflect.Value) { switch obj.Kind() { case reflect.Array:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jun 25 16:23:43 UTC 2022 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go
// the deep-copy was actually only a shallow copy. Then original and obj3 will be different after fuzzing. // NOTE: we use the encoding+decoding here as an alternative, guaranteed deep-copy to compare against. fuzzer.ValueFuzz(object) if !apiequality.Semantic.DeepEqual(original, obj3) { t.Errorf("%v: fuzzing a copy altered the original, diff: %v", name, cmp.Diff(original, obj3)) return } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 16.8K bytes - Viewed (0)