summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authortanjent@gmail.com <tanjent@gmail.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-03-31 02:41:29 +0000
committertanjent@gmail.com <tanjent@gmail.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-03-31 02:41:29 +0000
commit96601f2cd5d12b4618ecd830e8a155cad18e15dc (patch)
tree1da9d04e7f7f4b15cafb36e61e91525bb9fa96b4 /main.cpp
parent623590de821184aafc3aa6d72b9fd24791884751 (diff)
downloadsrc-96601f2cd5d12b4618ecd830e8a155cad18e15dc.tar.gz
Add TwoBytes test (not on by default)
Remove hash list duplication from collision test so we don't use so much RAM git-svn-id: http://smhasher.googlecode.com/svn/trunk@101 77a7d1d3-4c08-bdc2-d393-d5859734b01a
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index ab397e7..bc4996c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -20,6 +20,7 @@ bool g_testDiffDist = false;
bool g_testAvalanche = false;
bool g_testBIC = false;
bool g_testCyclic = false;
+bool g_testTwoBytes = false;
bool g_testSparse = false;
bool g_testPermutation = false;
bool g_testWindow = false;
@@ -255,6 +256,22 @@ void test ( hashfunc<hashtype> hash, HashInfo * info )
}
//-----------------------------------------------------------------------------
+ // Keyset 'TwoBytes'
+
+ if(g_testTwoBytes)
+ {
+ printf("[[[ Keyset 'TwoBytes' Tests ]]]\n\n");
+
+ bool result = true;
+ bool drawDiagram = false;
+
+ result &= TwoBytesTest<hashtype>(hash,24,drawDiagram);
+
+ if(!result) printf("*********FAIL*********\n");
+ printf("\n");
+ }
+
+ //-----------------------------------------------------------------------------
// Keyset 'Sparse'
if(g_testSparse || g_testAll)
@@ -539,6 +556,7 @@ int main ( int argc, char ** argv )
//g_testAvalanche = true;
//g_testBIC = true;
//g_testCyclic = true;
+ //g_testTwoBytes = true;
//g_testDiff = true;
//g_testDiffDist = true;
//g_testSparse = true;
@@ -547,6 +565,17 @@ int main ( int argc, char ** argv )
testHash(hashToTest);
+ /*
+ for(int i = 0; i < sizeof(g_hashes)/sizeof(HashInfo); i++)
+ {
+ testHash(g_hashes[i].name);
+ }
+ */
+
+ //testHash("murmur3a");
+ //testHash("murmur3c");
+ //testHash("murmur3f");
+
//----------
int timeEnd = clock();