From 598f838e0a93e0de9517350bb29623d3c7b62728 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 11 May 2017 02:13:27 -0400 Subject: [PATCH] Reduce random string size. Tests run faster without diminishing returns --- validat0.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/validat0.cpp b/validat0.cpp index f4837d56..29062bc4 100644 --- a/validat0.cpp +++ b/validat0.cpp @@ -43,7 +43,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -71,7 +71,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; i++) { std::string src, dest; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -104,7 +104,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -133,7 +133,7 @@ bool TestCompressors() { // See if we can induce a crash std::string src, dest; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -147,7 +147,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; i++) { std::string src, dest; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -180,7 +180,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -208,7 +208,7 @@ bool TestCompressors() for (unsigned int i=0; i<128; i++) { std::string src, dest; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xffff); + unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -241,7 +241,7 @@ bool TestEncryptors() for (unsigned int i=0; i(&src[0]), src.size()); @@ -274,7 +274,7 @@ bool TestEncryptors() for (unsigned int i=0; i(&src[0]), src.size()); @@ -339,7 +339,7 @@ bool TestEncryptors() for (unsigned int i=0; i(&src[0]), src.size()); @@ -372,7 +372,7 @@ bool TestEncryptors() for (unsigned int i=0; i(&src[0]), src.size());