github.com/cockroachdb/pebble@v1.1.2/internal/randvar/deck_test.go (about)

     1  // Copyright 2019 The LevelDB-Go and Pebble Authors. All rights reserved. Use
     2  // of this source code is governed by a BSD-style license that can be found in
     3  // the LICENSE file.
     4  
     5  package randvar
     6  
     7  import "testing"
     8  
     9  func TestDeck(t *testing.T) {
    10  	d := NewDeck(nil, 10, 20, 20, 0, 30)
    11  
    12  	x := make([]int, 10000)
    13  	for i := range x {
    14  		x[i] = d.Int()
    15  	}
    16  
    17  	if testing.Verbose() {
    18  		dumpSamples(x)
    19  	}
    20  }