| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
They are shorter, more readable, and don't require temp vars.
|
| |
|
|
|
| |
Fix checking of Logf, it has string in 0-th arg.
Add checking of t.Errorf/Fatalf.
|
| |
|
|
|
|
|
| |
Move image compression-related function to a separate package.
In preperation for subsequent changes that make decompression
more complex. Prog package is already large and complex.
Also makes running compression tests/benchmarks much faster.
|
| | |
|
| |
|
|
|
|
| |
Provide NumMutations method instead of Size.
It allows HeatMap to choose number of mutations better
(e.g. for completely empty/flat images w/o interesting data).
|
| |
|
|
|
| |
The code to send rand source is dublicated in several packages.
Move it to testutil package.
|
|
|
In this context, a heatmap is a flexible mechanism to choose where to
mutate some collection of bytes with some underlying probability
distribution, which could be dependent on the bytes themselves.
This commit defines the interface for heatmaps, implements a generic
one, and adds a test for it.
The expected usage of the heatmap inferface is:
- Caller selects heatmap type based on program type (or other logic),
and calls the appropriate `MakeXYZHeatmap`.
Currently there is only one, but over time we will add more with differing
probability distributions.
- Caller queries the heatmap using `hm.ChooseLocation(r)` for random
input `r`.
The generic heatmap is based on the current compression for disk images. It
avoids mutating within long runs of constant bytes by viewing the file
as a series of 64-byte chunks, and ignoring chunks which consist of a
single repeated byte.
|