testdef.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 26 行
H
26 行
#ifndef __TEST_DEF__#define __TEST_DEF__#include <cppunit/extensions/HelperMacros.h>#include <cppunit/TextTestRunner.h>#include "Types.h"#include "Exception.h"#define __BEGIN_TEST { CppUnit::TextUi::TestRunner runner;#define ADD_TEST(test) runner.addTest( test::suite() );#define RUN_TEST(testName) runner.run( testName, true );#define __END_TEST }#define __BEGIN_TEST_CASE try {#define __END_TEST_CASE } catch (Throwable& t) { \ cout << "---------------------------- TestCase Exception Handled" << endl; \ cout << "-" << endl; \ cout << "- " << t.toString().c_str() << endl; \ cout << "-" << endl; \ cout << "---------------------------- TestCase Exception Handled" << endl; \ filelog("testException.log", "%s", t.toString().c_str()); \ throw; \ }#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?