From b2d048aa0e01a350eaf524cc752ca5fa9a5a1140 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 21 Jun 2016 07:32:58 -0700 Subject: Make Dictionary templatable so it can be used where we want a higher capacity. --- selftest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'selftest.cpp') diff --git a/selftest.cpp b/selftest.cpp index eeffb9bd..0f777dfd 100644 --- a/selftest.cpp +++ b/selftest.cpp @@ -766,7 +766,7 @@ static int testOther() std::cout << "[other] Testing/fuzzing Dictionary... "; std::cout.flush(); for(int k=0;k<1000;++k) { - Dictionary test; + Dictionary<8194> test; char key[32][16]; char value[32][128]; for(unsigned int q=0;q<32;++q) { @@ -807,12 +807,12 @@ static int testOther() int foo = 0; volatile int *volatile bar = &foo; // force compiler not to optimize out test.get() below for(int k=0;k<100;++k) { - int r = rand() % ZT_DICTIONARY_MAX_SIZE; - unsigned char tmp[ZT_DICTIONARY_MAX_SIZE]; + int r = rand() % 8194; + unsigned char tmp[8194]; for(int q=0;q test((const char *)tmp); for(unsigned int q=0;q<100;++q) { char tmp[16]; Utils::snprintf(tmp,16,"%.8lx",(unsigned long)rand()); -- cgit v1.2.3