summaryrefslogtreecommitdiff
path: root/validat1.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-17 17:21:53 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-17 17:21:53 -0400
commit01b4ada1482f7e02266be75178b9da65df498267 (patch)
tree3dc2c49dd177d8c68507e4142b026420ee0ac40f /validat1.cpp
parent262e95fd8428056179d9ed5732255248f6eca84f (diff)
parentb7a08f1110ccd1143755269cbffc7d5eb2c238cb (diff)
downloadcryptopp-git-01b4ada1482f7e02266be75178b9da65df498267.tar.gz
Merge dev-branch 'trap' into 'master'
Diffstat (limited to 'validat1.cpp')
-rw-r--r--validat1.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/validat1.cpp b/validat1.cpp
index 86680d92..3a3c5cfb 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -82,7 +82,7 @@ bool ValidateAll(bool thorough)
pass=TestRDSEED() && pass;
#endif
-#if !defined(NDEBUG) && !defined(CRYPTOPP_IMPORTS)
+#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
// http://github.com/weidai11/cryptopp/issues/92
pass=TestSecBlock() && pass;
// http://github.com/weidai11/cryptopp/issues/64
@@ -216,7 +216,7 @@ bool TestSettings()
}
#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
- // Don't assert the alignment of testvals. That's what this test is for.
+ // Don't CRYPTOPP_ASSERT the alignment of testvals. That's what this test is for.
byte testvals[10] = {1,2,2,3,3,3,3,2,2,1};
if (*(word32 *)(void *)(testvals+3) == 0x03030303 && *(word64 *)(void *)(testvals+1) == W64LIT(0x0202030303030202))
cout << "passed: Your machine allows unaligned data access.\n";
@@ -334,7 +334,7 @@ bool TestSettings()
return pass;
}
-#if !defined(NDEBUG) && !defined(CRYPTOPP_IMPORTS)
+#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
bool TestSecBlock()
{
cout << "\nTesting SecBlock...\n\n";
@@ -1268,7 +1268,7 @@ bool TestSecBlock()
}
#endif
-#if !defined(NDEBUG) && !defined(CRYPTOPP_IMPORTS)
+#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
bool TestHuffmanCodes()
{
cout << "\nTesting Huffman codes...\n\n";
@@ -1580,7 +1580,7 @@ bool TestRDRAND()
RandomNumberSource rns(rdrand, SIZE, true, new Redirector(chsw));
deflator.Flush(true);
- assert(0 == maurer.BytesNeeded());
+ CRYPTOPP_ASSERT(0 == maurer.BytesNeeded());
const double mv = maurer.GetTestValue();
if (mv < 0.98f)
{
@@ -1659,7 +1659,7 @@ bool TestRDSEED()
RandomNumberSource rns(rdseed, SIZE, true, new Redirector(chsw));
deflator.Flush(true);
- assert(0 == maurer.BytesNeeded());
+ CRYPTOPP_ASSERT(0 == maurer.BytesNeeded());
const double mv = maurer.GetTestValue();
if (mv < 0.98f)
{
@@ -1803,7 +1803,7 @@ public:
{
std::cerr << "incorrect output " << counter << ", " << (word16)validOutput[counter] << ", " << (word16)inByte << "\n";
fail = true;
- assert(false);
+ CRYPTOPP_ASSERT(false);
}
counter++;
}
@@ -1818,7 +1818,7 @@ public:
if (counter != outputLen)
{
fail = true;
- assert(false);
+ CRYPTOPP_ASSERT(false);
}
return 0;