mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 14:31:35 +00:00
9277569ba3
Summary: Some files miss headers. Also some headers are irregular. Fix them to make an internal checkup tool happy. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10519 Reviewed By: jay-zhuang Differential Revision: D38603291 fbshipit-source-id: 13b1bbd6d48f5ee15ba20da67544396de48238f1
30 lines
1.3 KiB
C++
30 lines
1.3 KiB
C++
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
//
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
// (found in the LICENSE.Apache file in the root directory).
|
|
|
|
#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(); \
|
|
}
|