From e09c1a1c11522c11c6ea81dcb1c52a4e8a2f5c6c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 16 Jun 2016 12:28:43 -0700 Subject: Big refactor mostly builds. We now have a uniform backward compatible netconf. --- selftest.cpp | 54 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 16 deletions(-) (limited to 'selftest.cpp') diff --git a/selftest.cpp b/selftest.cpp index 33ec9e40..9e6e077a 100644 --- a/selftest.cpp +++ b/selftest.cpp @@ -766,23 +766,45 @@ static int testOther() std::cout << "[other] Testing Dictionary... "; std::cout.flush(); for(int k=0;k<1000;++k) { - Dictionary a,b; - int nk = rand() % 32; - for(int q=0;q= 0) { + if (strcmp(value[r],tmp)) { + std::cout << "FAILED (invalid value)!" << std::endl; + return -1; + } + } else { + std::cout << "FAILED (can't find key)!" << std::endl; + return -1; + } + } + } + int foo = 0; + volatile int *volatile bar = &foo; // force compiler not to optimize out test.get() below + for(int k=0;k<100000;++k) { + int r = rand() % 16384; + unsigned char tmp[16384]; + for(int q=0;q