aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/Assertions.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-20 16:52:58 +0800
committerchriseth <chris@ethereum.org>2017-06-21 01:21:29 +0800
commit57f79ebfa65bdc0dfce9de5ec7e9d8f4c2db1197 (patch)
tree54594e686ccf2d1e6e04e87e10f8c3d3eae857bc /libdevcore/Assertions.h
parentcb5f2f90f6d70f299bd0a4e0e6ed597fd728180b (diff)
downloaddexon-solidity-57f79ebfa65bdc0dfce9de5ec7e9d8f4c2db1197.tar.gz
dexon-solidity-57f79ebfa65bdc0dfce9de5ec7e9d8f4c2db1197.tar.zst
dexon-solidity-57f79ebfa65bdc0dfce9de5ec7e9d8f4c2db1197.zip
Remove debugbreak.
Diffstat (limited to 'libdevcore/Assertions.h')
-rw-r--r--libdevcore/Assertions.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/libdevcore/Assertions.h b/libdevcore/Assertions.h
index e54b9d55..0151cfc1 100644
--- a/libdevcore/Assertions.h
+++ b/libdevcore/Assertions.h
@@ -25,7 +25,6 @@
#pragma once
#include "Exceptions.h"
-#include "debugbreak.h"
namespace dev
{
@@ -38,37 +37,6 @@ namespace dev
#define ETH_FUNC __func__
#endif
-#define asserts(A) ::dev::assertAux(A, #A, __LINE__, __FILE__, ETH_FUNC)
-#define assertsEqual(A, B) ::dev::assertEqualAux(A, B, #A, #B, __LINE__, __FILE__, ETH_FUNC)
-
-inline bool assertAux(bool _a, char const* _aStr, unsigned _line, char const* _file, char const* _func)
-{
- bool ret = _a;
- if (!ret)
- {
- std::cerr << "Assertion failed:" << _aStr << " [func=" << _func << ", line=" << _line << ", file=" << _file << "]" << std::endl;
-#if ETH_DEBUG
- debug_break();
-#endif
- }
- return !ret;
-}
-
-template<class A, class B>
-inline bool assertEqualAux(A const& _a, B const& _b, char const* _aStr, char const* _bStr, unsigned _line, char const* _file, char const* _func)
-{
- bool ret = _a == _b;
- if (!ret)
- {
- std::cerr << "Assertion failed: " << _aStr << " == " << _bStr << " [func=" << _func << ", line=" << _line << ", file=" << _file << "]" << std::endl;
- std::cerr << " Fail equality: " << _a << "==" << _b << std::endl;
-#if ETH_DEBUG
- debug_break();
-#endif
- }
- return !ret;
-}
-
/// Assertion that throws an exception containing the given description if it is not met.
/// Use it as assertThrow(1 == 1, ExceptionType, "Mathematics is wrong.");
/// Do NOT supply an exception object as the second parameter.