cut.h

来自「用于C/C++的单元测试工具源码」· C头文件 代码 · 共 47 行

H
47
字号
/* * cut.h * CUT 2.2 * * Copyright (c) 2001 Samuel A. Falvo II, William D. Tanksley * See LICENSE.TXT for details. * * Based on WDT's "TestAssert" package. * * $log$ */#ifndef CUT_CUT_H_INCLUDED#define CUT_CUT_H_INCLUDEDtypedef void CUTTakedownFunction( void );void cut_start            ( char *, CUTTakedownFunction * );void cut_init             ( int breakpoint );void cut_break_formatting ( void );void cut_resume_formatting( void );void cut_interject( const char *, ... );#define cut_end(t)           __cut_end( __FILE__, __LINE__, t )#define cut_mark_point()     __cut_mark_point(__FILE__,__LINE__)#define cut_check_errors()   __cut_check_errors( __FILE__, __LINE__ )#define ASSERT(X,msg)        __cut_assert(__FILE__,__LINE__,msg,#X,X)#define ASSERT_EQUALS(X,Y,msg)   __cut_assert_equals( __FILE__, __LINE__, msg, #X " == " #Y, ( (X) == (Y) ), X )#define STATIC_ASSERT(X)  extern bool __static_ASSERT_at_line_##__LINE__##__[ (0!=(X))*2-1 ];/* * These functions are not officially "public".  They exist here because they * need to be for proper operation of CUT.  Please use the aforementioned * macros instead. */void __cut_end          ( char *, int, char * );void __cut_mark_point   ( char *, int );void __cut_assert       ( char *, int, char *, char *, int );void __cut_assert_equals( char *, int, char *, char *, int, int );int  __cut_check_errors ( char *, int );#endif

⌨️ 快捷键说明

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