diff options
Diffstat (limited to 'quick_test.go')
-rw-r--r-- | quick_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/quick_test.go b/quick_test.go index 3db0b6c..cda7b30 100644 --- a/quick_test.go +++ b/quick_test.go @@ -55,6 +55,12 @@ func (t testdata) Generate(rand *rand.Rand, size int) reflect.Value { return reflect.ValueOf(items) } +type revtestdata []testdataitem + +func (t revtestdata) Len() int { return len(t) } +func (t revtestdata) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t revtestdata) Less(i, j int) bool { return bytes.Compare(t[i].Key, t[j].Key) == 1 } + type testdataitem struct { Key []byte Value []byte |