]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/fuzz/util.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / fuzz / util.h
1 // Copyright (c) Meta Platforms, Inc. and affiliates.
2 //
3 // This source code is licensed under both the GPLv2 (found in the
4 // COPYING file in the root directory) and Apache 2.0 License
5 // (found in the LICENSE.Apache file in the root directory).
6
7 #pragma once
8
9 #define CHECK_OK(expression) \
10 do { \
11 auto status = (expression); \
12 if (!status.ok()) { \
13 std::cerr << status.ToString() << std::endl; \
14 abort(); \
15 } \
16 } while (0)
17
18 #define CHECK_EQ(a, b) \
19 if (a != b) { \
20 std::cerr << "(" << #a << "=" << a << ") != (" << #b << "=" << b << ")" \
21 << std::endl; \
22 abort(); \
23 }
24
25 #define CHECK_TRUE(cond) \
26 if (!(cond)) { \
27 std::cerr << "\"" << #cond << "\" is false" << std::endl; \
28 abort(); \
29 }