Return a time no later than 5000 years from unix datum. JSON cannot handle dates after year 9999.
(t *time.Time, c fuzz.Continue)
| 120 | // Return a time no later than 5000 years from unix datum. |
| 121 | // JSON cannot handle dates after year 9999. |
| 122 | func 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 | |
| 130 | func fuzzTimeSlice(t *[]time.Time, c fuzz.Continue) { |
| 131 | var i uint64 |
no outgoing calls
no test coverage detected
searching dependent graphs…