File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,16 +33,16 @@ Watchdog::Watchdog(uint64_t ms) : destroyed_(false) {
3333 CHECK (loop_);
3434
3535 int rc = uv_async_init (loop_, &async_, &Watchdog::Async);
36- CHECK ( 0 == rc); // NOLINT(readability/check)
36+ CHECK_EQ ( 0 , rc);
3737
3838 rc = uv_timer_init (loop_, &timer_);
39- CHECK ( 0 == rc); // NOLINT(readability/check)
39+ CHECK_EQ ( 0 , rc);
4040
4141 rc = uv_timer_start (&timer_, &Watchdog::Timer, ms, 0 );
42- CHECK ( 0 == rc); // NOLINT(readability/check)
42+ CHECK_EQ ( 0 , rc);
4343
4444 rc = uv_thread_create (&thread_, &Watchdog::Run, this );
45- CHECK ( 0 == rc); // NOLINT(readability/check)
45+ CHECK_EQ ( 0 , rc);
4646}
4747
4848
Original file line number Diff line number Diff line change @@ -44,14 +44,18 @@ namespace node {
4444 TypeName (const TypeName&)
4545
4646#if defined(NDEBUG)
47- #define ASSERT (expression )
48- #define CHECK (expression ) \
47+ # define ASSERT (expression )
48+ # define CHECK (expression ) \
4949 do { \
5050 if (!(expression)) abort (); \
5151 } while (0 )
52+ # define CHECK_EQ (a, b ) CHECK((a) == (b))
53+ # define CHECK_NE (a, b ) CHECK((a) != (b))
5254#else
53- #define ASSERT (expression ) assert (expression)
54- #define CHECK (expression ) assert (expression)
55+ # define ASSERT (expression ) assert (expression)
56+ # define CHECK (expression ) assert (expression)
57+ # define CHECK_EQ (a, b ) assert ((a) == (b))
58+ # define CHECK_NE (a, b ) assert ((a) != (b))
5559#endif
5660
5761#define UNREACHABLE () abort()
You can’t perform that action at this time.
0 commit comments