...

Source file src/go.mongodb.org/mongo-driver/internal/rand/regress_test.go

Documentation: go.mongodb.org/mongo-driver/internal/rand

     1  // Copied from https://cs.opensource.google/go/x/exp/+/24438e51023af3bfc1db8aed43c1342817e8cfcd:rand/regress_test.go
     2  
     3  // Copyright 2014 The Go Authors.  All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Test that random number sequences generated by a specific seed
     8  // do not change from version to version.
     9  //
    10  // If the generator changes, the golden outputs need updating, and
    11  // client programs may break. Although the desire for compatibility
    12  // is not as stringent as in the original math/rand package,
    13  // when possible avoid changing the generator.
    14  
    15  package rand_test
    16  
    17  import (
    18  	"flag"
    19  	"fmt"
    20  	"reflect"
    21  	"testing"
    22  
    23  	. "go.mongodb.org/mongo-driver/internal/rand"
    24  )
    25  
    26  var printgolden = flag.Bool("printgolden", false, "print golden results for regression test")
    27  
    28  // TestSource verifies that the output of the default Source is locked down.
    29  func TestSourceRegress(t *testing.T) {
    30  	src := NewSource(1)
    31  	var got [20]uint64
    32  	for i := range got {
    33  		got[i] = src.Uint64()
    34  	}
    35  	want := [20]uint64{
    36  		0x34e936394905d167,
    37  		0x817c0ef62fe4c731,
    38  		0x937987e6e24f5a40,
    39  		0x0c0a8307fe226199,
    40  		0xf96363568d8bab56,
    41  		0xbaef3af36bd02620,
    42  		0x8f18e416eb6b936b,
    43  		0x05a43fc149f3a67a,
    44  		0xdab012eb3ce01697,
    45  		0xf76c495a133c6aa9,
    46  		0x304b24c5040ce457,
    47  		0x47d77e0abb413159,
    48  		0x52a810fa9e452f04,
    49  		0x2d24b66380cf4780,
    50  		0x5ec7691b92018ef5,
    51  		0x5076dfa749261ea0,
    52  		0xac8f11ad3941d213,
    53  		0x13fa8d67de91db25,
    54  		0xb50883a9893274eb,
    55  		0xeb8f59263f9109ac,
    56  	}
    57  	if got != want {
    58  		t.Errorf("got:\n\t%#016x\nwant:\n\t%#016x", got, want)
    59  		if *printgolden {
    60  			for _, x := range got {
    61  				fmt.Printf("\t\t%#016x,\n", x)
    62  			}
    63  		}
    64  	}
    65  }
    66  
    67  // TestRegress validates that the output stream is locked down, for instance so
    68  // optimizations do not change the output. It iterates over methods of the
    69  // Rand type to find functions to evaluate and checks the first 20 results
    70  // against the golden results.
    71  func TestRegress(t *testing.T) {
    72  	var int32s = []int32{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1}
    73  	var int64s = []int64{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1, 1000000000000000000, 1 << 60, 1<<63 - 2, 1<<63 - 1}
    74  	var uint64s = []uint64{1, 10, 32, 1 << 20, 1<<20 + 1, 1000000000, 1 << 30, 1<<31 - 2, 1<<31 - 1, 1000000000000000000, 1 << 60, 1<<64 - 2, 1<<64 - 1}
    75  	var permSizes = []int{0, 1, 5, 8, 9, 10, 16}
    76  	var readBufferSizes = []int{1, 7, 8, 9, 10}
    77  	r := New(NewSource(0))
    78  
    79  	rv := reflect.ValueOf(r)
    80  	n := rv.NumMethod()
    81  	p := 0
    82  	if *printgolden {
    83  		fmt.Printf("var regressGolden = []interface{}{\n")
    84  	}
    85  	for i := 0; i < n; i++ {
    86  		m := rv.Type().Method(i)
    87  		mv := rv.Method(i)
    88  		mt := mv.Type()
    89  		if mt.NumOut() == 0 {
    90  			continue
    91  		}
    92  		r.Seed(0)
    93  		if *printgolden && i > 0 {
    94  			fmt.Println()
    95  		}
    96  		for repeat := 0; repeat < 20; repeat++ {
    97  			var args []reflect.Value
    98  			var argstr string
    99  			if mt.NumIn() == 1 {
   100  				var x interface{}
   101  				switch mt.In(0).Kind() {
   102  				default:
   103  					t.Fatalf("unexpected argument type for r.%s", m.Name)
   104  
   105  				case reflect.Int:
   106  					if m.Name == "Perm" {
   107  						x = permSizes[repeat%len(permSizes)]
   108  						break
   109  					}
   110  					big := int64s[repeat%len(int64s)]
   111  					if int64(int(big)) != big {
   112  						r.Int63n(big) // what would happen on 64-bit machine, to keep stream in sync
   113  						if *printgolden {
   114  							fmt.Printf("\tskipped, // must run printgolden on 64-bit machine\n")
   115  						}
   116  						p++
   117  						continue
   118  					}
   119  					x = int(big)
   120  
   121  				case reflect.Int32:
   122  					x = int32s[repeat%len(int32s)]
   123  
   124  				case reflect.Int64:
   125  					x = int64s[repeat%len(int64s)]
   126  
   127  				case reflect.Uint64:
   128  					x = uint64s[repeat%len(uint64s)]
   129  
   130  				case reflect.Slice:
   131  					if m.Name == "Read" {
   132  						n := readBufferSizes[repeat%len(readBufferSizes)]
   133  						x = make([]byte, n)
   134  					}
   135  				}
   136  				argstr = fmt.Sprint(x)
   137  				args = append(args, reflect.ValueOf(x))
   138  			}
   139  
   140  			var out interface{}
   141  			out = mv.Call(args)[0].Interface()
   142  			if m.Name == "Int" || m.Name == "Intn" {
   143  				out = int64(out.(int))
   144  			}
   145  			if m.Name == "Read" {
   146  				out = args[0].Interface().([]byte)
   147  			}
   148  			if *printgolden {
   149  				var val string
   150  				big := int64(1 << 60)
   151  				if int64(int(big)) != big && (m.Name == "Int" || m.Name == "Intn") {
   152  					// 32-bit machine cannot print 64-bit results
   153  					val = "truncated"
   154  				} else if reflect.TypeOf(out).Kind() == reflect.Slice {
   155  					val = fmt.Sprintf("%#v", out)
   156  				} else {
   157  					val = fmt.Sprintf("%T(%v)", out, out)
   158  				}
   159  				fmt.Printf("\t%s, // %s(%s)\n", val, m.Name, argstr)
   160  			} else {
   161  				want := regressGolden[p]
   162  				if m.Name == "Int" {
   163  					want = int64(int(uint(want.(int64)) << 1 >> 1))
   164  				}
   165  				if !reflect.DeepEqual(out, want) {
   166  					t.Errorf("r.%s(%s) = %v, want %v", m.Name, argstr, out, want)
   167  				}
   168  			}
   169  			p++
   170  		}
   171  	}
   172  	if *printgolden {
   173  		fmt.Printf("}\n")
   174  	}
   175  }
   176  
   177  var regressGolden = []interface{}{
   178  	float64(0.6279600685109523),   // ExpFloat64()
   179  	float64(0.16198826513357806),  // ExpFloat64()
   180  	float64(0.007880404652650552), // ExpFloat64()
   181  	float64(0.41649788761745654),  // ExpFloat64()
   182  	float64(1.6958707787276301),   // ExpFloat64()
   183  	float64(2.7227327706138036),   // ExpFloat64()
   184  	float64(2.4235600263079657),   // ExpFloat64()
   185  	float64(1.277967771105418),    // ExpFloat64()
   186  	float64(0.7111660437031769),   // ExpFloat64()
   187  	float64(0.23090401427981888),  // ExpFloat64()
   188  	float64(1.4746763588379928),   // ExpFloat64()
   189  	float64(1.4868726779832278),   // ExpFloat64()
   190  	float64(0.1686257242078103),   // ExpFloat64()
   191  	float64(0.2732721816228957),   // ExpFloat64()
   192  	float64(0.4644536065869748),   // ExpFloat64()
   193  	float64(0.01319850986379164),  // ExpFloat64()
   194  	float64(0.7184492551742854),   // ExpFloat64()
   195  	float64(0.1913536422195827),   // ExpFloat64()
   196  	float64(0.16034475958495667),  // ExpFloat64()
   197  	float64(0.40599859014785644),  // ExpFloat64()
   198  
   199  	float32(0.7979972),   // Float32()
   200  	float32(0.7725961),   // Float32()
   201  	float32(0.21894403),  // Float32()
   202  	float32(0.96194494),  // Float32()
   203  	float32(0.2915732),   // Float32()
   204  	float32(0.59569645),  // Float32()
   205  	float32(0.99596655),  // Float32()
   206  	float32(0.4979039),   // Float32()
   207  	float32(0.98148686),  // Float32()
   208  	float32(0.01380035),  // Float32()
   209  	float32(0.086487144), // Float32()
   210  	float32(0.6114401),   // Float32()
   211  	float32(0.71081316),  // Float32()
   212  	float32(0.6342346),   // Float32()
   213  	float32(0.008082573), // Float32()
   214  	float32(0.33020085),  // Float32()
   215  	float32(0.032625034), // Float32()
   216  	float32(0.9278005),   // Float32()
   217  	float32(0.34497985),  // Float32()
   218  	float32(0.66506875),  // Float32()
   219  
   220  	float64(0.797997151016231),    // Float64()
   221  	float64(0.7725961454373316),   // Float64()
   222  	float64(0.21894402538580782),  // Float64()
   223  	float64(0.9619449481780457),   // Float64()
   224  	float64(0.2915731877602916),   // Float64()
   225  	float64(0.5956964580775652),   // Float64()
   226  	float64(0.9959665347028619),   // Float64()
   227  	float64(0.49790390966591147),  // Float64()
   228  	float64(0.9814868602566785),   // Float64()
   229  	float64(0.013800350332924483), // Float64()
   230  	float64(0.08648714463652596),  // Float64()
   231  	float64(0.6114401479210267),   // Float64()
   232  	float64(0.7108131531183706),   // Float64()
   233  	float64(0.6342346133706837),   // Float64()
   234  	float64(0.008082572853887138), // Float64()
   235  	float64(0.3302008651926287),   // Float64()
   236  	float64(0.03262503454637655),  // Float64()
   237  	float64(0.9278004634858956),   // Float64()
   238  	float64(0.3449798628384906),   // Float64()
   239  	float64(0.665068719316529),    // Float64()
   240  
   241  	int64(5474557666971700975), // Int()
   242  	int64(5591422465364813936), // Int()
   243  	int64(74029666500212977),   // Int()
   244  	int64(8088122161323000979), // Int()
   245  	int64(7298457654139700474), // Int()
   246  	int64(1590632625527662686), // Int()
   247  	int64(9052198920789078554), // Int()
   248  	int64(7381380909356947872), // Int()
   249  	int64(1738222704626512495), // Int()
   250  	int64(3278744831230954970), // Int()
   251  	int64(7062423222661652521), // Int()
   252  	int64(6715870808026712034), // Int()
   253  	int64(528819992478005418),  // Int()
   254  	int64(2284534088986354339), // Int()
   255  	int64(945828723091990082),  // Int()
   256  	int64(3813019469742317492), // Int()
   257  	int64(1369388146907482806), // Int()
   258  	int64(7367238674766648970), // Int()
   259  	int64(8217673022687244206), // Int()
   260  	int64(3185531743396549562), // Int()
   261  
   262  	int32(1711064216), // Int31()
   263  	int32(650927245),  // Int31()
   264  	int32(8618187),    // Int31()
   265  	int32(941581344),  // Int31()
   266  	int32(1923394120), // Int31()
   267  	int32(1258915833), // Int31()
   268  	int32(1053814650), // Int31()
   269  	int32(859305834),  // Int31()
   270  	int32(1276097579), // Int31()
   271  	int32(1455437958), // Int31()
   272  	int32(1895916096), // Int31()
   273  	int32(781830261),  // Int31()
   274  	int32(61562749),   // Int31()
   275  	int32(265954771),  // Int31()
   276  	int32(1183850779), // Int31()
   277  	int32(443893888),  // Int31()
   278  	int32(1233159585), // Int31()
   279  	int32(857659461),  // Int31()
   280  	int32(956663049),  // Int31()
   281  	int32(370844703),  // Int31()
   282  
   283  	int32(0),          // Int31n(1)
   284  	int32(6),          // Int31n(10)
   285  	int32(17),         // Int31n(32)
   286  	int32(1000595),    // Int31n(1048576)
   287  	int32(424333),     // Int31n(1048577)
   288  	int32(382438494),  // Int31n(1000000000)
   289  	int32(902738458),  // Int31n(1073741824)
   290  	int32(1204933878), // Int31n(2147483646)
   291  	int32(1376191263), // Int31n(2147483647)
   292  	int32(0),          // Int31n(1)
   293  	int32(9),          // Int31n(10)
   294  	int32(2),          // Int31n(32)
   295  	int32(440490),     // Int31n(1048576)
   296  	int32(176312),     // Int31n(1048577)
   297  	int32(946765890),  // Int31n(1000000000)
   298  	int32(665034676),  // Int31n(1073741824)
   299  	int32(1947285452), // Int31n(2147483646)
   300  	int32(1702344608), // Int31n(2147483647)
   301  	int32(0),          // Int31n(1)
   302  	int32(2),          // Int31n(10)
   303  
   304  	int64(5474557666971700975), // Int63()
   305  	int64(5591422465364813936), // Int63()
   306  	int64(74029666500212977),   // Int63()
   307  	int64(8088122161323000979), // Int63()
   308  	int64(7298457654139700474), // Int63()
   309  	int64(1590632625527662686), // Int63()
   310  	int64(9052198920789078554), // Int63()
   311  	int64(7381380909356947872), // Int63()
   312  	int64(1738222704626512495), // Int63()
   313  	int64(3278744831230954970), // Int63()
   314  	int64(7062423222661652521), // Int63()
   315  	int64(6715870808026712034), // Int63()
   316  	int64(528819992478005418),  // Int63()
   317  	int64(2284534088986354339), // Int63()
   318  	int64(945828723091990082),  // Int63()
   319  	int64(3813019469742317492), // Int63()
   320  	int64(1369388146907482806), // Int63()
   321  	int64(7367238674766648970), // Int63()
   322  	int64(8217673022687244206), // Int63()
   323  	int64(3185531743396549562), // Int63()
   324  
   325  	int64(0),                   // Int63n(1)
   326  	int64(6),                   // Int63n(10)
   327  	int64(17),                  // Int63n(32)
   328  	int64(1000595),             // Int63n(1048576)
   329  	int64(424333),              // Int63n(1048577)
   330  	int64(382438494),           // Int63n(1000000000)
   331  	int64(902738458),           // Int63n(1073741824)
   332  	int64(1204933878),          // Int63n(2147483646)
   333  	int64(1376191263),          // Int63n(2147483647)
   334  	int64(502116868085730778),  // Int63n(1000000000000000000)
   335  	int64(144894195020570665),  // Int63n(1152921504606846976)
   336  	int64(6715870808026712034), // Int63n(9223372036854775806)
   337  	int64(528819992478005418),  // Int63n(9223372036854775807)
   338  	int64(0),                   // Int63n(1)
   339  	int64(0),                   // Int63n(10)
   340  	int64(20),                  // Int63n(32)
   341  	int64(854710),              // Int63n(1048576)
   342  	int64(649893),              // Int63n(1048577)
   343  	int64(687244206),           // Int63n(1000000000)
   344  	int64(836883386),           // Int63n(1073741824)
   345  
   346  	int64(0),                   // Intn(1)
   347  	int64(6),                   // Intn(10)
   348  	int64(17),                  // Intn(32)
   349  	int64(1000595),             // Intn(1048576)
   350  	int64(424333),              // Intn(1048577)
   351  	int64(382438494),           // Intn(1000000000)
   352  	int64(902738458),           // Intn(1073741824)
   353  	int64(1204933878),          // Intn(2147483646)
   354  	int64(1376191263),          // Intn(2147483647)
   355  	int64(502116868085730778),  // Intn(1000000000000000000)
   356  	int64(144894195020570665),  // Intn(1152921504606846976)
   357  	int64(6715870808026712034), // Intn(9223372036854775806)
   358  	int64(528819992478005418),  // Intn(9223372036854775807)
   359  	int64(0),                   // Intn(1)
   360  	int64(0),                   // Intn(10)
   361  	int64(20),                  // Intn(32)
   362  	int64(854710),              // Intn(1048576)
   363  	int64(649893),              // Intn(1048577)
   364  	int64(687244206),           // Intn(1000000000)
   365  	int64(836883386),           // Intn(1073741824)
   366  
   367  	float64(-0.5410658516792047),  // NormFloat64()
   368  	float64(0.615296849055287),    // NormFloat64()
   369  	float64(0.007477442280032887), // NormFloat64()
   370  	float64(1.3443892057169684),   // NormFloat64()
   371  	float64(-0.17508902754863512), // NormFloat64()
   372  	float64(-2.03494397556937),    // NormFloat64()
   373  	float64(2.5213558871972306),   // NormFloat64()
   374  	float64(1.4572921639613627),   // NormFloat64()
   375  	float64(-1.5164961164210644),  // NormFloat64()
   376  	float64(-0.4861150771891445),  // NormFloat64()
   377  	float64(-0.8699409548614199),  // NormFloat64()
   378  	float64(1.6271559815452794),   // NormFloat64()
   379  	float64(0.1659465769926195),   // NormFloat64()
   380  	float64(0.2921716191987018),   // NormFloat64()
   381  	float64(-1.2550269636927838),  // NormFloat64()
   382  	float64(0.11257973349467548),  // NormFloat64()
   383  	float64(0.5437525915836436),   // NormFloat64()
   384  	float64(0.781754430770282),    // NormFloat64()
   385  	float64(0.5201256313962235),   // NormFloat64()
   386  	float64(1.3826174159276245),   // NormFloat64()
   387  
   388  	[]int{},                             // Perm(0)
   389  	[]int{0},                            // Perm(1)
   390  	[]int{0, 2, 3, 1, 4},                // Perm(5)
   391  	[]int{5, 6, 3, 7, 4, 2, 0, 1},       // Perm(8)
   392  	[]int{8, 4, 5, 2, 7, 3, 0, 6, 1},    // Perm(9)
   393  	[]int{6, 1, 5, 3, 2, 9, 7, 0, 8, 4}, // Perm(10)
   394  	[]int{12, 5, 1, 9, 15, 7, 13, 6, 10, 11, 8, 0, 4, 2, 14, 3}, // Perm(16)
   395  	[]int{},                             // Perm(0)
   396  	[]int{0},                            // Perm(1)
   397  	[]int{0, 2, 3, 4, 1},                // Perm(5)
   398  	[]int{3, 2, 7, 4, 0, 6, 5, 1},       // Perm(8)
   399  	[]int{0, 6, 2, 1, 3, 7, 5, 8, 4},    // Perm(9)
   400  	[]int{2, 5, 6, 4, 7, 3, 0, 8, 1, 9}, // Perm(10)
   401  	[]int{3, 6, 5, 4, 9, 15, 13, 7, 1, 11, 10, 8, 12, 0, 2, 14}, // Perm(16)
   402  	[]int{},                             // Perm(0)
   403  	[]int{0},                            // Perm(1)
   404  	[]int{2, 4, 3, 1, 0},                // Perm(5)
   405  	[]int{1, 6, 7, 5, 4, 3, 2, 0},       // Perm(8)
   406  	[]int{7, 6, 8, 2, 0, 1, 3, 4, 5},    // Perm(9)
   407  	[]int{2, 9, 7, 1, 5, 4, 0, 6, 8, 3}, // Perm(10)
   408  
   409  	[]byte{0xef}, // Read([0])
   410  	[]byte{0x4e, 0x3d, 0x52, 0x31, 0x89, 0xf9, 0xcb},                   // Read([0 0 0 0 0 0 0])
   411  	[]byte{0x70, 0x68, 0x35, 0x8d, 0x1b, 0xb9, 0x98, 0x4d},             // Read([0 0 0 0 0 0 0 0])
   412  	[]byte{0xf1, 0xf8, 0x95, 0xe6, 0x96, 0x1, 0x7, 0x1, 0x93},          // Read([0 0 0 0 0 0 0 0 0])
   413  	[]byte{0x44, 0x9f, 0xc5, 0x40, 0xc8, 0x3e, 0x70, 0xfa, 0x44, 0x3a}, // Read([0 0 0 0 0 0 0 0 0 0])
   414  	[]byte{0x4b}, // Read([0])
   415  	[]byte{0x91, 0x54, 0x49, 0xe5, 0x5e, 0x28, 0xb9},                   // Read([0 0 0 0 0 0 0])
   416  	[]byte{0x4, 0xf2, 0xf, 0x13, 0x96, 0x1a, 0xb2, 0xce},               // Read([0 0 0 0 0 0 0 0])
   417  	[]byte{0x35, 0xf5, 0xde, 0x9f, 0x7d, 0xa0, 0x19, 0x12, 0x2e},       // Read([0 0 0 0 0 0 0 0 0])
   418  	[]byte{0xd4, 0xee, 0x6f, 0x66, 0x6f, 0x32, 0xc8, 0x21, 0x57, 0x68}, // Read([0 0 0 0 0 0 0 0 0 0])
   419  	[]byte{0x1f}, // Read([0])
   420  	[]byte{0x98, 0xda, 0x4d, 0xab, 0x6e, 0xd, 0x71},                   // Read([0 0 0 0 0 0 0])
   421  	[]byte{0x80, 0xad, 0x29, 0xa0, 0x37, 0xb0, 0x80, 0xc4},            // Read([0 0 0 0 0 0 0 0])
   422  	[]byte{0x2, 0xe2, 0xe2, 0x7, 0xd9, 0xed, 0xea, 0x90, 0x33},        // Read([0 0 0 0 0 0 0 0 0])
   423  	[]byte{0x5d, 0xaa, 0xb8, 0xc6, 0x39, 0xfb, 0xbe, 0x56, 0x7, 0xa3}, // Read([0 0 0 0 0 0 0 0 0 0])
   424  	[]byte{0x62}, // Read([0])
   425  	[]byte{0x4d, 0x63, 0xa6, 0x4b, 0xb4, 0x1f, 0x42},                // Read([0 0 0 0 0 0 0])
   426  	[]byte{0x66, 0x42, 0x62, 0x36, 0x42, 0x20, 0x8d, 0xb4},          // Read([0 0 0 0 0 0 0 0])
   427  	[]byte{0x9f, 0xa3, 0x67, 0x1, 0x91, 0xea, 0x34, 0xb6, 0xa},      // Read([0 0 0 0 0 0 0 0 0])
   428  	[]byte{0xd, 0xa8, 0x43, 0xb, 0x1, 0x93, 0x8a, 0x56, 0xfc, 0x98}, // Read([0 0 0 0 0 0 0 0 0 0])
   429  
   430  	uint32(3422128433), // Uint32()
   431  	uint32(1301854491), // Uint32()
   432  	uint32(17236374),   // Uint32()
   433  	uint32(1883162688), // Uint32()
   434  	uint32(3846788241), // Uint32()
   435  	uint32(2517831666), // Uint32()
   436  	uint32(2107629301), // Uint32()
   437  	uint32(1718611668), // Uint32()
   438  	uint32(2552195159), // Uint32()
   439  	uint32(2910875917), // Uint32()
   440  	uint32(3791832192), // Uint32()
   441  	uint32(1563660522), // Uint32()
   442  	uint32(123125499),  // Uint32()
   443  	uint32(531909542),  // Uint32()
   444  	uint32(2367701558), // Uint32()
   445  	uint32(887787777),  // Uint32()
   446  	uint32(2466319171), // Uint32()
   447  	uint32(1715318922), // Uint32()
   448  	uint32(1913326099), // Uint32()
   449  	uint32(741689406),  // Uint32()
   450  
   451  	uint64(14697929703826476783), // Uint64()
   452  	uint64(5591422465364813936),  // Uint64()
   453  	uint64(74029666500212977),    // Uint64()
   454  	uint64(8088122161323000979),  // Uint64()
   455  	uint64(16521829690994476282), // Uint64()
   456  	uint64(10814004662382438494), // Uint64()
   457  	uint64(9052198920789078554),  // Uint64()
   458  	uint64(7381380909356947872),  // Uint64()
   459  	uint64(10961594741481288303), // Uint64()
   460  	uint64(12502116868085730778), // Uint64()
   461  	uint64(16285795259516428329), // Uint64()
   462  	uint64(6715870808026712034),  // Uint64()
   463  	uint64(528819992478005418),   // Uint64()
   464  	uint64(2284534088986354339),  // Uint64()
   465  	uint64(10169200759946765890), // Uint64()
   466  	uint64(3813019469742317492),  // Uint64()
   467  	uint64(10592760183762258614), // Uint64()
   468  	uint64(7367238674766648970),  // Uint64()
   469  	uint64(8217673022687244206),  // Uint64()
   470  	uint64(3185531743396549562),  // Uint64()
   471  
   472  	uint64(0),                   // Uint64n(1)
   473  	uint64(6),                   // Uint64n(10)
   474  	uint64(17),                  // Uint64n(32)
   475  	uint64(1000595),             // Uint64n(1048576)
   476  	uint64(424333),              // Uint64n(1048577)
   477  	uint64(382438494),           // Uint64n(1000000000)
   478  	uint64(902738458),           // Uint64n(1073741824)
   479  	uint64(1204933878),          // Uint64n(2147483646)
   480  	uint64(1376191263),          // Uint64n(2147483647)
   481  	uint64(502116868085730778),  // Uint64n(1000000000000000000)
   482  	uint64(144894195020570665),  // Uint64n(1152921504606846976)
   483  	uint64(6715870808026712034), // Uint64n(18446744073709551614)
   484  	uint64(528819992478005418),  // Uint64n(18446744073709551615)
   485  	uint64(0),                   // Uint64n(1)
   486  	uint64(0),                   // Uint64n(10)
   487  	uint64(20),                  // Uint64n(32)
   488  	uint64(854710),              // Uint64n(1048576)
   489  	uint64(649893),              // Uint64n(1048577)
   490  	uint64(687244206),           // Uint64n(1000000000)
   491  	uint64(836883386),           // Uint64n(1073741824)
   492  }
   493  

View as plain text