aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-01 21:20:55 +0000
committerlloyd <[email protected]>2014-01-01 21:20:55 +0000
commit197dc467dec28a04c3b2f30da7cef122dfbb13e9 (patch)
treecdbd3ddaec051c72f0a757db461973d90c37b97a /src/utils/assert.h
parent62faac373c07cfe10bc8c309e89ebdd30d8e5eaa (diff)
Shuffle things around. Add NIST X.509 test to build.
Diffstat (limited to 'src/utils/assert.h')
-rw-r--r--src/utils/assert.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/utils/assert.h b/src/utils/assert.h
deleted file mode 100644
index f62fae63e..000000000
--- a/src/utils/assert.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Runtime assertion checking
-* (C) 2010 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#ifndef BOTAN_ASSERTION_CHECKING_H__
-#define BOTAN_ASSERTION_CHECKING_H__
-
-#include <botan/build.h>
-
-namespace Botan {
-
-/**
-* Called when an assertion fails
-*/
-void BOTAN_DLL assertion_failure(const char* expr_str,
- const char* assertion_made,
- const char* func,
- const char* file,
- int line);
-
-/**
-* Make an assertion
-*/
-#define BOTAN_ASSERT(expr, assertion_made) \
- do { \
- if(!(expr)) \
- Botan::assertion_failure(#expr, \
- assertion_made, \
- __func__, \
- __FILE__, \
- __LINE__); \
- } while(0)
-
-/**
-* Assert that value1 == value2
-*/
-#define BOTAN_ASSERT_EQUAL(expr1, expr2, assertion_made) \
- do { \
- if((expr1) != (expr2)) \
- Botan::assertion_failure(#expr1 " == " #expr2, \
- assertion_made, \
- __func__, \
- __FILE__, \
- __LINE__); \
- } while(0)
-
-/**
-* Assert that expr1 (if true) implies expr2 is also true
-*/
-#define BOTAN_ASSERT_IMPLICATION(expr1, expr2, msg) \
- do { \
- if((expr1) && !(expr2)) \
- Botan::assertion_failure(#expr1 " implies " #expr2, \
- msg, \
- __func__, \
- __FILE__, \
- __LINE__); \
- } while(0)
-
-/**
-* Assert that a pointer is not null
-*/
-#define BOTAN_ASSERT_NONNULL(ptr) \
- do { \
- if(static_cast<bool>(ptr) == false) \
- Botan::assertion_failure(#ptr " is not null", \
- "", \
- __func__, \
- __FILE__, \
- __LINE__); \
- } while(0)
-
-/**
-* Mark variable as unused
-*/
-#define BOTAN_UNUSED(v) static_cast<void>(v)
-
-}
-
-#endif