📄 basetestcase.h
字号:
/*! Time-stamp: <@(#)BaseTestCase.h 2005-12-10 Ricmy zhu mail: ricmy_zhu@newsofitn.com>
******************************************************************************
* file : BaseTestCase.h
* brief Base Test case system
* Project : Test case system 1.10
* Package : BaseTestCase
* Company : NEWSOFTINC
* Author : Ricmy zhu Date: 2005-12-10
* Purpose : add test case in project .
******************************************************************************
* Version History:
*
* V 1.10 2005-12-10 BN : First Revision
*
******************************************************************************
*/
//#ifdef TEST_CASE_CODE
#if !defined(AFX_BASETESTCASE_H__DF8C9508_7940_4A5E_9E27_813D50058B93__INCLUDED_)
#define AFX_BASETESTCASE_H__DF8C9508_7940_4A5E_9E27_813D50058B93__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// <body of your header file>
#include <AFXWIN.H>
#include "AfxBase.h"
#ifdef __cplusplus
extern "C" {
#endif
void WINAPI test_case_delay(long lTime,HANDLE hHandle);
#ifdef TEST_CASE_CODE
#define TEST_CASE_TRACE(strInfo) CBaseTestCase::test_case_trace(this,strInfo)
#define TEST_CASE_ASSERT(bVal) CBaseTestCase::test_case_assert(this,bVal)
#else
#define TEST_CASE_TRACE(strInfo) TRACE(strInfo)
#define TEST_CASE_ASSERT(bVal) ASSERT(bVal)
#endif
#ifdef TEST_CASE_CODE
#define TEST_CASE_DELAY(lTime) test_case_delay (lTime,NULL)
#define TEST_CASE_DELAY0 (long lTime,hEvent) test_case_delay (0,hEvent)
#define TEST_CASE_DELAY1 (hEvent) test_case_delay (0,hEvent)
#else
#define TEST_CASE_DELAY (lTime)
#define TEST_CASE_DELAY_Ex (hEvent)
#endif
void WINAPI test_case_trace(CString strClassName,CString strFunctionName,CString strInfo,...);
#ifdef __cplusplus
} // extern "C"
#endif
class AFX_EXT_CLASS CBaseTestCase : public CObject
{
public:
CBaseTestCase();
virtual ~CBaseTestCase();
virtual FUNINFO * GetTestCaseMap() ;
virtual LPSTR GetTestCaseClassName() = 0;
BASE_TEST_CASE_TRACE
//-------------------------------------------
// for begin test this class to let you
// Prepare entironment for test
//-------------------------------------------
virtual void onBeginTest() ;
//-------------------------------------------
// for end test this class to let you
// free you entironment for test
//-------------------------------------------
virtual void onEndTest() ;
//-------------------------------------------
// get this test class all test caset
// and do it
//-------------------------------------------
//-------------------------------------------
// get all Test case class and
// do test case action
//-------------------------------------------
static void BeginAllTestCase();
};
//#endif
#endif // !defined(AFX_BASETESTCASE_H__DF8C9508_7940_4A5E_9E27_813D50058B93__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -