mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 11:43:49 +00:00
491779514e
Summary: as title Pull Request resolved: https://github.com/facebook/rocksdb/pull/7761 Test Plan: cd fuzz && make sst_file_writer_fuzzer && ./sst_file_writer_fuzzer Reviewed By: pdillinger Differential Revision: D25430802 Pulled By: cheng-chang fbshipit-source-id: 01436307df6f4c434bb608f44e1c8e4a1119f94f
24 lines
1 KiB
C++
24 lines
1 KiB
C++
#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(); \
|
|
}
|