check.h

来自「实现了poll/epoll/devpoll等C++封装」· C头文件 代码 · 共 25 行

H
25
字号
#ifndef CHECK_h#define CHECK_h/**-------------------------------------------------------------------------- @name CHECK.h - Helper functions for unit self-tests. Each macro makes a particular check, and if the check fails, an error message containing the filename and line number is printed to stdout, and the program is terminated with status 1.--------------------------------------------------------------------------*/#ifdef __cplusplusextern "C" {#endif/** Check two integers to make sure they are equal. */#define CHECK(d, e) check((int)(d), (int)(e), __FILE__,  __LINE__)void check(int d, int e, const char * file, int line);/** Check two integers to make sure they are not equal. */#define CHECKNE(d, e) checkne((int)(d), (int)(e), __FILE__,  __LINE__)void checkne(int d, int e, const char * file, int line);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?