fork of https://github.com/oxigraph/rocksdb and https://github.com/facebook/rocksdb for nextgraph and oxigraph
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
24 lines
1.0 KiB
4 years ago
|
#pragma once
|
||
|
|
||
|
#define CHECK_OK(expression) \
|
||
|
do { \
|
||
|
auto status = (expression); \
|
||
|
if (!status.ok()) { \
|
||
|
std::cerr << status.ToString() << std::endl; \
|
||
|
abort(); \
|
||
|
} \
|
||
|
} while (0)
|
||
|
|
||
|
#define CHECK_EQ(a, b) \
|
||
|
if (a != b) { \
|
||
|
std::cerr << "(" << #a << "=" << a << ") != (" << #b << "=" << b << ")" \
|
||
|
<< std::endl; \
|
||
|
abort(); \
|
||
|
}
|
||
|
|
||
|
#define CHECK_TRUE(cond) \
|
||
|
if (!(cond)) { \
|
||
|
std::cerr << "\"" << #cond << "\" is false" << std::endl; \
|
||
|
abort(); \
|
||
|
}
|