MCPcopy Create free account
hub / github.com/buger/jsonparser / oracleSetValue

Function oracleSetValue

reference_oracle_test.go:499–506  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Property 2: Set append/replace — Set then Get returns the set value. This is the test that WOULD HAVE CAUGHT PR #286's bug. --------------------------------------------------------------------------- oracleSetValue returns a

(r *mathrand.Rand)

Source from the content-addressed store, hash-verified

497// oracleSetValue returns a JSON-encoded value suitable for passing to Set.
498// Drawn from the same rich generator as the documents themselves.
499func oracleSetValue(r *mathrand.Rand) []byte {
500 v := oracleRandomJSONValue(r, 0)
501 b, err := json.Marshal(v)
502 if err != nil {
503 return []byte(`null`)
504 }
505 return b
506}
507
508// reqproof:proptest Set
509// Verifies: SYS-REQ-009 [property]

Callers 1

TestOracleSetRoundTripFunction · 0.85

Calls 1

oracleRandomJSONValueFunction · 0.85

Tested by

no test coverage detected