|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Hash Fct. More...
#include <gtest/gtest.h>#include <hash-fct.H>#include <array>#include <cstring>#include <random>#include <set>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| class | HashTestEnvironment |
| class | HashConsistencyTest |
| class | HashEdgeCaseTest |
| class | HashDifferenceTest |
| class | HashVoidPtrTest |
| class | HashTemplateTest |
| struct | UserTypeNS::Point3D |
| class | HashDistributionTest |
| class | HashAvalancheTest |
Namespaces | |
| namespace | UserTypeNS |
Functions | |
| TEST_F (HashConsistencyTest, AddHashConsistency) | |
| TEST_F (HashConsistencyTest, XorHashConsistency) | |
| TEST_F (HashConsistencyTest, RotHashConsistency) | |
| TEST_F (HashConsistencyTest, DjbHashConsistency) | |
| TEST_F (HashConsistencyTest, SaxHashConsistency) | |
| TEST_F (HashConsistencyTest, FnvHashConsistency) | |
| TEST_F (HashConsistencyTest, OatHashConsistency) | |
| TEST_F (HashConsistencyTest, JswHashConsistency) | |
| TEST_F (HashConsistencyTest, ElfHashConsistency) | |
| TEST_F (HashConsistencyTest, JenHashConsistency) | |
| TEST_F (HashConsistencyTest, SuperFastHashConsistency) | |
| TEST_F (HashConsistencyTest, Murmur3HashConsistency) | |
| TEST_F (HashConsistencyTest, DftHashFctConsistency) | |
| TEST_F (HashConsistencyTest, DftHashUsesWyhashBackend) | |
| TEST_F (HashConsistencyTest, XxHash64Consistency) | |
| TEST_F (HashConsistencyTest, WyHashConsistency) | |
| TEST_F (HashConsistencyTest, SipHashConsistency) | |
| TEST_F (HashEdgeCaseTest, EmptyStringHash) | |
| TEST_F (HashEdgeCaseTest, SingleCharHash) | |
| TEST_F (HashEdgeCaseTest, LargeStringHash) | |
| TEST_F (HashEdgeCaseTest, BinaryDataWithNulls) | |
| TEST_F (HashDifferenceTest, DifferentStringsDifferentHashes) | |
| TEST_F (HashDifferenceTest, DifferentIntsDifferentHashes) | |
| TEST_F (HashDifferenceTest, DifferentSeedsDifferentHashes) | |
| TEST_F (HashVoidPtrTest, IntArrayHash) | |
| TEST_F (HashVoidPtrTest, StructHash) | |
| TEST_F (HashTemplateTest, IntTemplateHash) | |
| TEST_F (HashTemplateTest, DoubleTemplateHash) | |
| TEST_F (HashTemplateTest, LongLongTemplateHash) | |
| TEST (PairHashTest, PairDftHashFct) | |
| TEST (PairHashTest, PairSndHashFct) | |
| TEST (PairHashTest, MixedPairComponents) | |
| TEST (PairHashTest, PointerWrappersMatchDirectCalls) | |
| size_t | UserTypeNS::aleph_hash_value (const Point3D &p) noexcept |
| TEST (AlephHashADL, UserTypeDeterministic) | |
| TEST (AlephHashADL, UserTypeDftAndSndDiffer) | |
| TEST (AlephHashADL, UserTypeDistinctPointsDistinctHashes) | |
| TEST (AlephHashADL, ConceptDetectedCorrectly) | |
| TEST_F (HashDistributionTest, FnvHashUniqueness) | |
| TEST_F (HashDistributionTest, OatHashUniqueness) | |
| TEST_F (HashDistributionTest, SuperFastHashUniqueness) | |
| TEST_F (HashDistributionTest, JenHashUniqueness) | |
| TEST_F (HashDistributionTest, Murmur3HashUniqueness) | |
| TEST_F (HashDistributionTest, DftHashFctUniqueness) | |
| TEST_F (HashDistributionTest, XxHash64Uniqueness) | |
| TEST_F (HashDistributionTest, WyHashUniqueness) | |
| TEST_F (HashDistributionTest, SipHashUniqueness) | |
| TEST_F (HashAvalancheTest, SingleBitChangeJenkins) | |
| TEST_F (HashAvalancheTest, SingleBitChangeMurmur3) | |
| TEST_F (HashAvalancheTest, SingleBitChangeXxHash64) | |
| TEST_F (HashAvalancheTest, SingleBitChangeWyHash) | |
| TEST_F (HashAvalancheTest, SingleBitChangeSipHash) | |
| TEST_F (HashAvalancheTest, SingleBitChangeOat) | |
| TEST (HashKnownValuesTest, AddHashKnownValue) | |
| TEST (HashKnownValuesTest, XorHashKnownValue) | |
| TEST (HashKnownValuesTest, FnvHashStartValue) | |
| TEST (HashKnownValuesTest, SipHashOfficialVectors) | |
| TEST (SeededHashTest, JenHashWithDefaultSeed) | |
| TEST (SeededHashTest, DftHashFctWithSeed) | |
| TEST (HashTypeSafetyTest, SignedUnsignedConsistency) | |
| TEST (HashTypeSafetyTest, ConstCharPtrAndStringConsistency) | |
| TEST (HashTypeSafetyTest, PointerHashIsStableAcrossCallPaths) | |
| TEST (HashPerformanceTest, LargeDataHashing) | |
| TEST (HashPerformanceTest, ManySmallHashes) | |
Variables | |
| testing::Environment *const | hash_env |
Tests for Hash Fct.
Exhaustive test suite for hash functions in hash-fct.H.
Tests cover:
Definition in file hash_fct_test.cc.
| TEST | ( | AlephHashADL | , |
| ConceptDetectedCorrectly | |||
| ) |
Definition at line 693 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | AlephHashADL | , |
| UserTypeDeterministic | |||
| ) |
Definition at line 669 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), Aleph::divide_and_conquer_partition_dp(), and Aleph::snd_hash_fct().
| TEST | ( | AlephHashADL | , |
| UserTypeDftAndSndDiffer | |||
| ) |
Definition at line 678 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), Aleph::divide_and_conquer_partition_dp(), and Aleph::snd_hash_fct().
| TEST | ( | AlephHashADL | , |
| UserTypeDistinctPointsDistinctHashes | |||
| ) |
Definition at line 685 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | HashKnownValuesTest | , |
| AddHashKnownValue | |||
| ) |
Definition at line 949 of file hash_fct_test.cc.
References Aleph::add_hash(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | HashKnownValuesTest | , |
| FnvHashStartValue | |||
| ) |
Definition at line 961 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::fnv_hash().
| TEST | ( | HashKnownValuesTest | , |
| SipHashOfficialVectors | |||
| ) |
Definition at line 969 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::siphash24_hash().
| TEST | ( | HashKnownValuesTest | , |
| XorHashKnownValue | |||
| ) |
Definition at line 955 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::xor_hash().
| TEST | ( | HashPerformanceTest | , |
| LargeDataHashing | |||
| ) |
Definition at line 1061 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), Aleph::murmur3hash(), Aleph::oat_hash(), Aleph::siphash24_hash(), Aleph::SuperFastHash(), Aleph::wyhash_hash(), and Aleph::xxhash64_hash().
| TEST | ( | HashPerformanceTest | , |
| ManySmallHashes | |||
| ) |
Definition at line 1084 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), and Aleph::sum().
| TEST | ( | HashTypeSafetyTest | , |
| ConstCharPtrAndStringConsistency | |||
| ) |
Definition at line 1029 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), Aleph::divide_and_conquer_partition_dp(), Aleph::djb_hash(), Aleph::fnv_hash(), Aleph::oat_hash(), Aleph::sax_hash(), and Aleph::SuperFastHash().
| TEST | ( | HashTypeSafetyTest | , |
| PointerHashIsStableAcrossCallPaths | |||
| ) |
Definition at line 1045 of file hash_fct_test.cc.
References Aleph::Aleph_Snd_Hash_Seed, Aleph::dft_hash_fct(), Aleph::dft_hash_ptr_fct(), Aleph::divide_and_conquer_partition_dp(), Aleph::snd_hash_fct(), Aleph::snd_hash_ptr_fct(), and Aleph::SuperFastHash().
| TEST | ( | HashTypeSafetyTest | , |
| SignedUnsignedConsistency | |||
| ) |
Definition at line 1018 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::fnv_hash().
| TEST | ( | PairHashTest | , |
| MixedPairComponents | |||
| ) |
Definition at line 623 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::pair_dft_hash_fct(), and Aleph::pair_snd_hash_fct().
| TEST | ( | PairHashTest | , |
| PairDftHashFct | |||
| ) |
Definition at line 597 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::pair_dft_hash_fct().
| TEST | ( | PairHashTest | , |
| PairSndHashFct | |||
| ) |
Definition at line 612 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::pair_snd_hash_fct().
| TEST | ( | PairHashTest | , |
| PointerWrappersMatchDirectCalls | |||
| ) |
Definition at line 632 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::pair_dft_hash_fct(), and Aleph::pair_snd_hash_fct().
| TEST | ( | SeededHashTest | , |
| DftHashFctWithSeed | |||
| ) |
Definition at line 1006 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | SeededHashTest | , |
| JenHashWithDefaultSeed | |||
| ) |
Definition at line 998 of file hash_fct_test.cc.
References Aleph::Default_Hash_Seed, Aleph::divide_and_conquer_partition_dp(), and Aleph::jen_hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeJenkins | |||
| ) |
Definition at line 859 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::jen_hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeMurmur3 | |||
| ) |
Definition at line 876 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::murmur3hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeOat | |||
| ) |
Definition at line 932 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::oat_hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeSipHash | |||
| ) |
Definition at line 918 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::siphash24_hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeWyHash | |||
| ) |
Definition at line 904 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::wyhash_hash().
| TEST_F | ( | HashAvalancheTest | , |
| SingleBitChangeXxHash64 | |||
| ) |
Definition at line 890 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::xxhash64_hash().
| TEST_F | ( | HashConsistencyTest | , |
| AddHashConsistency | |||
| ) |
Definition at line 89 of file hash_fct_test.cc.
References Aleph::add_hash(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | HashConsistencyTest | , |
| DftHashFctConsistency | |||
| ) |
Definition at line 263 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | HashConsistencyTest | , |
| DftHashUsesWyhashBackend | |||
| ) |
Definition at line 274 of file hash_fct_test.cc.
References Aleph::Aleph_Snd_Hash_Seed, Aleph::dft_hash_fct(), Aleph::divide_and_conquer_partition_dp(), Aleph::snd_hash_fct(), and Aleph::wyhash_hash().
| TEST_F | ( | HashConsistencyTest | , |
| DjbHashConsistency | |||
| ) |
Definition at line 135 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::djb_hash().
| TEST_F | ( | HashConsistencyTest | , |
| ElfHashConsistency | |||
| ) |
Definition at line 205 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::elf_hash().
| TEST_F | ( | HashConsistencyTest | , |
| FnvHashConsistency | |||
| ) |
Definition at line 163 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::fnv_hash().
| TEST_F | ( | HashConsistencyTest | , |
| JenHashConsistency | |||
| ) |
Definition at line 219 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::jen_hash(), and seed.
| TEST_F | ( | HashConsistencyTest | , |
| JswHashConsistency | |||
| ) |
Definition at line 191 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::jsw_hash().
| TEST_F | ( | HashConsistencyTest | , |
| Murmur3HashConsistency | |||
| ) |
Definition at line 251 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::murmur3hash(), and seed.
| TEST_F | ( | HashConsistencyTest | , |
| OatHashConsistency | |||
| ) |
Definition at line 177 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::oat_hash().
| TEST_F | ( | HashConsistencyTest | , |
| RotHashConsistency | |||
| ) |
Definition at line 121 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::rot_hash().
| TEST_F | ( | HashConsistencyTest | , |
| SaxHashConsistency | |||
| ) |
Definition at line 149 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::sax_hash().
| TEST_F | ( | HashConsistencyTest | , |
| SipHashConsistency | |||
| ) |
Definition at line 313 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::siphash24_hash().
| TEST_F | ( | HashConsistencyTest | , |
| SuperFastHashConsistency | |||
| ) |
Definition at line 237 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::SuperFastHash().
| TEST_F | ( | HashConsistencyTest | , |
| WyHashConsistency | |||
| ) |
Definition at line 299 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::wyhash_hash().
| TEST_F | ( | HashConsistencyTest | , |
| XorHashConsistency | |||
| ) |
Definition at line 105 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::xor_hash().
| TEST_F | ( | HashConsistencyTest | , |
| XxHash64Consistency | |||
| ) |
Definition at line 285 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::xxhash64_hash().
| TEST_F | ( | HashDifferenceTest | , |
| DifferentIntsDifferentHashes | |||
| ) |
Definition at line 452 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::djb_hash(), Aleph::fnv_hash(), Aleph::oat_hash(), and Aleph::SuperFastHash().
| TEST_F | ( | HashDifferenceTest | , |
| DifferentSeedsDifferentHashes | |||
| ) |
Definition at line 466 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::jen_hash(), Aleph::murmur3hash(), Aleph::siphash24_hash(), Aleph::wyhash_hash(), and Aleph::xxhash64_hash().
| TEST_F | ( | HashDifferenceTest | , |
| DifferentStringsDifferentHashes | |||
| ) |
Definition at line 430 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::djb_hash(), Aleph::elf_hash(), Aleph::fnv_hash(), Aleph::jsw_hash(), Aleph::oat_hash(), Aleph::sax_hash(), and Aleph::SuperFastHash().
| TEST_F | ( | HashDistributionTest | , |
| DftHashFctUniqueness | |||
| ) |
Definition at line 795 of file hash_fct_test.cc.
References Aleph::dft_hash_fct(), Aleph::divide_and_conquer_partition_dp(), and keys.
| TEST_F | ( | HashDistributionTest | , |
| FnvHashUniqueness | |||
| ) |
Definition at line 740 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), and keys.
| TEST_F | ( | HashDistributionTest | , |
| JenHashUniqueness | |||
| ) |
Definition at line 773 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::jen_hash(), and keys.
| TEST_F | ( | HashDistributionTest | , |
| Murmur3HashUniqueness | |||
| ) |
Definition at line 784 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::murmur3hash().
| TEST_F | ( | HashDistributionTest | , |
| OatHashUniqueness | |||
| ) |
Definition at line 751 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::oat_hash().
| TEST_F | ( | HashDistributionTest | , |
| SipHashUniqueness | |||
| ) |
Definition at line 828 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::siphash24_hash().
| TEST_F | ( | HashDistributionTest | , |
| SuperFastHashUniqueness | |||
| ) |
Definition at line 762 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::SuperFastHash().
| TEST_F | ( | HashDistributionTest | , |
| WyHashUniqueness | |||
| ) |
Definition at line 817 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::wyhash_hash().
| TEST_F | ( | HashDistributionTest | , |
| XxHash64Uniqueness | |||
| ) |
Definition at line 806 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), keys, and Aleph::xxhash64_hash().
| TEST_F | ( | HashEdgeCaseTest | , |
| BinaryDataWithNulls | |||
| ) |
Definition at line 411 of file hash_fct_test.cc.
References Aleph::add_hash(), Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), Aleph::jen_hash(), Aleph::oat_hash(), and Aleph::SuperFastHash().
| TEST_F | ( | HashEdgeCaseTest | , |
| EmptyStringHash | |||
| ) |
Definition at line 344 of file hash_fct_test.cc.
References Aleph::add_hash(), Aleph::divide_and_conquer_partition_dp(), Aleph::djb_hash(), Aleph::elf_hash(), Aleph::fnv_hash(), Aleph::jsw_hash(), Aleph::oat_hash(), Aleph::rot_hash(), Aleph::sax_hash(), Aleph::SuperFastHash(), and Aleph::xor_hash().
| TEST_F | ( | HashEdgeCaseTest | , |
| LargeStringHash | |||
| ) |
Definition at line 379 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), Aleph::murmur3hash(), Aleph::oat_hash(), Aleph::siphash24_hash(), Aleph::SuperFastHash(), Aleph::wyhash_hash(), and Aleph::xxhash64_hash().
| TEST_F | ( | HashEdgeCaseTest | , |
| SingleCharHash | |||
| ) |
Definition at line 359 of file hash_fct_test.cc.
References Aleph::add_hash(), Aleph::divide_and_conquer_partition_dp(), Aleph::djb_hash(), Aleph::elf_hash(), Aleph::fnv_hash(), Aleph::jsw_hash(), Aleph::oat_hash(), Aleph::rot_hash(), Aleph::sax_hash(), Aleph::SuperFastHash(), and Aleph::xor_hash().
| TEST_F | ( | HashTemplateTest | , |
| DoubleTemplateHash | |||
| ) |
Definition at line 569 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), and Aleph::oat_hash().
| TEST_F | ( | HashTemplateTest | , |
| IntTemplateHash | |||
| ) |
Definition at line 555 of file hash_fct_test.cc.
References Aleph::add_hash(), Aleph::divide_and_conquer_partition_dp(), and Aleph::fnv_hash().
| TEST_F | ( | HashTemplateTest | , |
| LongLongTemplateHash | |||
| ) |
Definition at line 582 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), and Aleph::SuperFastHash().
| TEST_F | ( | HashVoidPtrTest | , |
| IntArrayHash | |||
| ) |
Definition at line 505 of file hash_fct_test.cc.
References Aleph::add_hash(), Aleph::Default_Hash_Seed, Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), Aleph::jen_hash(), Aleph::oat_hash(), and Aleph::SuperFastHash().
| TEST_F | ( | HashVoidPtrTest | , |
| StructHash | |||
| ) |
Definition at line 523 of file hash_fct_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::fnv_hash(), Aleph::oat_hash(), and Aleph::SuperFastHash().
| testing::Environment* const hash_env |
Definition at line 74 of file hash_fct_test.cc.