summaryrefslogtreecommitdiff
path: root/validat0.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-05-29 00:43:20 -0400
committerJeffrey Walton <noloader@gmail.com>2017-05-29 00:43:20 -0400
commitae3922dda0c4c7d75381f2b74425c34adb762c5f (patch)
treee8a2fbe1a245fe38f710b77aa76064c27ee7df4c /validat0.cpp
parent0df38c3506efbe8aac5ce7a695c01d487348dcc1 (diff)
downloadcryptopp-git-ae3922dda0c4c7d75381f2b74425c34adb762c5f.tar.gz
Remove calls to cout.flush() for AppVeyor
They seemed to produce a hang when running self tests in AppVeyor. Also use IsDebuggerPresent() to determine when we should call DebugBreak(). The OS killed our debug build when fuzzing caused an assert to fail
Diffstat (limited to 'validat0.cpp')
-rw-r--r--validat0.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/validat0.cpp b/validat0.cpp
index c4a25c76..a0aa9e61 100644
--- a/validat0.cpp
+++ b/validat0.cpp
@@ -141,9 +141,6 @@ bool TestPolynomialMod2()
std::cout << (!pass2 ? "FAILED" : "passed") << ": " << "0x" << std::hex << word(SIZE_MAX) << std::dec << " shifted over range [" << start << "," << stop << "]" << "\n";
std::cout << (!pass3 ? "FAILED" : "passed") << ": " << "random values shifted over range [" << std::dec << start << "," << stop << "]" << "\n";
- if (!(pass1 && pass2 && pass3))
- std::cout.flush();
-
return pass1 && pass2 && pass3;
}
#endif
@@ -428,7 +425,6 @@ bool TestCompressors()
// **************************************************************
- std::cout.flush();
return !fail1 && !fail2 && !fail3;
}
@@ -684,6 +680,7 @@ bool TestSharing()
vector_member_ptrs<StringSource> strSources(threshold);
channel.resize(CHID_LENGTH);
+
for (unsigned int i=0; i<threshold; i++)
{
strSources[i].reset(new StringSource(strShares[i], false));
@@ -717,6 +714,7 @@ bool TestSharing()
for (unsigned int shares=3; shares<SECRET_SHARES; ++shares)
{
+
std::string message;
unsigned int len = GlobalRNG().GenerateWord32(0, 0xff);
unsigned int threshold = GlobalRNG().GenerateWord32(2, shares-1);
@@ -1226,7 +1224,6 @@ bool TestRounding()
std::cout << (fail ? "FAILED:" : "passed:") << " RoundUpToMultipleOf, word128, overflow\n";
#endif
- std::cout.flush();
return pass;
}
#endif
@@ -1305,7 +1302,6 @@ bool RunASN1TestSet(const ASN1_TestTuple asnTuples[], size_t count)
pass = !fail && pass;
}
- std::cout.flush();
return pass;
}
@@ -1479,7 +1475,6 @@ bool TestASN1Parse()
pass = RunASN1TestSet(integerValues, COUNTOF(integerValues)) && pass;
- std::cout.flush();
return pass;
}
#endif
@@ -2444,7 +2439,6 @@ bool TestSecBlock()
std::cout << " FixedSizeAllocator Grow with word128\n";
#endif
- std::cout.flush();
return pass1 && pass2 && pass3 && pass4 && pass5 && pass6 && pass7;
}
#endif
@@ -3212,7 +3206,6 @@ bool TestIntegerBitops()
std::cout << "FAILED:";
std::cout << " Bitwise XOR over 32-bits to 1024-bits\n";
- std::cout.flush();
return opa && opo && opx;
}
#endif