MCPcopy Create free account
hub / github.com/pquerna/ffjson / fuzzTime

Function fuzzTime

tests/fuzz_test.go:122–128  ·  view source on GitHub ↗

Return a time no later than 5000 years from unix datum. JSON cannot handle dates after year 9999.

(t *time.Time, c fuzz.Continue)

Source from the content-addressed store, hash-verified

120// Return a time no later than 5000 years from unix datum.
121// JSON cannot handle dates after year 9999.
122func fuzzTime(t *time.Time, c fuzz.Continue) {
123 sec := c.Rand.Int63()
124 nsec := c.Rand.Int63()
125 // No more than 5000 years in the future
126 sec %= 5000 * 365 * 24 * 60 * 60
127 *t = time.Unix(sec, nsec)
128}
129
130func fuzzTimeSlice(t *[]time.Time, c fuzz.Continue) {
131 var i uint64

Callers 1

fuzzTimeSliceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…