MCPcopy
hub / github.com/RoaringBitmap/roaring / hashTest

Function hashTest

roaring_test.go:354–553  ·  view source on GitHub ↗
(t *testing.T, N uint64)

Source from the content-addressed store, hash-verified

352}
353
354func hashTest(t *testing.T, N uint64) {
355 // Expected checksums for reproducible testing
356 expectedChecksums := map[uint64]map[uint64]map[int]uint64{
357 15: {
358 1: {0: 10756319042591085143, 1: 8628356015285516814},
359 2: {0: 9098333059944862327, 1: 8643661217147186334},
360 4: {0: 6958029410146852663, 1: 8552786581093523559},
361 8: {0: 1468016395925628727, 1: 17120221891265014711},
362 16: {0: 10544680338284849079, 1: 10276365928919663543},
363 32: {0: 16946816020221683671, 1: 15774941559772765735},
364 64: {0: 6805685596090222999, 1: 14027082878079462903},
365 128: {0: 10938873449103961751, 1: 15444148319012625847},
366 256: {0: 11309310771509366551, 1: 7069335405671456567},
367 512: {0: 12541562025061152055, 1: 16261505930335083639},
368 1024: {0: 2339435738231874871, 1: 10952176602620091831},
369 2048: {0: 3316768049318457015, 1: 17316440206395307191},
370 4096: {0: 7701764264875653559, 1: 14832271157678859191},
371 8192: {0: 16988454899365713580, 1: 10726883116002431148},
372 16384: {0: 2090028183478809173, 1: 9796457766245620565},
373 32768: {0: 7760976824469153733, 1: 12282386713985239749},
374 65536: {0: 981896277892437765, 1: 11087826385241811525},
375 },
376 100: {
377 1: {0: 9066279125779985483, 1: 8577657534118736529},
378 2: {0: 4369425401968277239, 1: 8664705869706981924},
379 4: {0: 11010263968690220268, 1: 8747926805318181728},
380 8: {0: 10633650503763838178, 1: 7914439743116618412},
381 16: {0: 2103672447757413801, 1: 17045885344622844731},
382 32: {0: 12393679577414425883, 1: 6955536801820872561},
383 64: {0: 8197316132833680708, 1: 8636063068238530422},
384 128: {0: 7231439595719530925, 1: 15483402246458171763},
385 256: {0: 16279390471979224259, 1: 10865940656713619409},
386 512: {0: 18178650019838088967, 1: 3561060448163512986},
387 1024: {0: 14129223433416501692, 1: 7566389309386577368},
388 2048: {0: 7894714367708308029, 1: 14322377208770974283},
389 4096: {0: 6808097750982305134, 1: 15258365281783128036},
390 8192: {0: 5220938908514583451, 1: 7907615236815205617},
391 16384: {0: 7801599049027983452, 1: 15366568190157828206},
392 32768: {0: 12138675384054307626, 1: 1639002974230284776},
393 65536: {0: 14890641509296776915, 1: 4669671005208206569},
394 },
395 512: {
396 1: {0: 827073066654895541, 1: 8612092039284236527},
397 2: {0: 12579948327828555139, 1: 8611133265144625760},
398 4: {0: 13237566687897418215, 1: 8610189884167809947},
399 8: {0: 1963122788668779039, 1: 11510392801384632065},
400 16: {0: 16746247274296044527, 1: 13465507099452589101},
401 32: {0: 825734909322010511, 1: 12319660855737761317},
402 64: {0: 9549528494128535247, 1: 14223792047697043957},
403 128: {0: 4041381740454103948, 1: 6750203723185038846},
404 256: {0: 7479480802351225402, 1: 15120562265861553528},
405 512: {0: 10226096245326616211, 1: 2123185684866484358},
406 1024: {0: 11147571132137264071, 1: 1491568024944778791},
407 2048: {0: 13981076381879476127, 1: 9988660227473270361},
408 4096: {0: 11371001616995089391, 1: 6746885678345436557},
409 8192: {0: 13391729850604800783, 1: 8278994428803645669},
410 16384: {0: 16904558478699170767, 1: 18317580384194851125},
411 32768: {0: 9632691026248850622, 1: 7001884646453199196},

Callers 1

TestHashFunction · 0.85

Calls 5

AddIntMethod · 0.95
ChecksumMethod · 0.95
AddRangeMethod · 0.95
RunOptimizeMethod · 0.95
NewBitmapFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…