?????????? CUnit ??饗2??
???????????? ???????[ 2013/8/30 14:28:53 ] ????????
????const CU_pRunSummary CU_get_run_summary(void) ???????в????????????????????????????????????????????壺
typedef struct CU_RunSummary
{
unsigned int nSuitesRun;
unsigned int nSuitesFailed;
unsigned int nTestsRun;
unsigned int nTestsFailed;
unsigned int nAsserts;
unsigned int nAssertsFailed;
unsigned int nFailureRecords;
} CU_RunSummary;
typedef CU_Runsummary* CU_pRunSummary;
?????÷???????????????????????????????????????????????????????????????????????Ч???
????const CU_pFailureRecord CU_get_failure_list(void) ????????β??????????????????????д??????NULL???y??嶨?????£?
typedef struct CU_FailureRecord
{
unsigned int uiLineNumber;
char* strFileName;
char* strCondition;
CU_pTest pTest;
CU_pSuite pSuite;
struct CU_FailureRecord* pNext;
struct CU_FailureRecord* pPrev;
} CU_FailureRecord;
typedef CU_FailureRecord* CU_pFailureRecord;
?????????????????????????????
????unsigned int CU_get_number_of_failure_records(void) ???CU_get_failure_list()??????????CU_FailureRecord???????????????????????????????????????????????????????????????????????
????6. ??????
????6.1 ??????????
#include <CUnit/CUError.h>
typedef enum CU_ErrorCode
CU_ErrorCode CU_get_error(void);
const char* CU_get_error_msg(void);
typedef enum CU_ErrorAction
void CU_set_error_action(CU_ErrorAction action);
CU_ErrorAction CU_get_error_action(void);
????6.2 ??????
??????CUnit?У??????????????????????????????????Щ????????????????????Щ???????????????????????CUnit???????????????????????????
????CU_ErrorCode CU_get_error(void)
????const char* CU_get_error_msg(void)
?????????????????????????????????????????????????????????????????????????<CUnit/CUError.h>???????????£?
CUE_SUCCESS No error condition.
CUE_NOMEMORY Memory allocation failed.
CUE_NOREGISTRY Test registry not initialized.
CUE_REGISTRY_EXISTS Attempt to CU_set_registry() without CU_cleanup_registry().
CUE_NOSUITE A required CU_pSuite pointer was NULL.
CUE_NO_SUITENAME Required CU_Suite name not provided.
CUE_SINIT_FAILED Suite initialization failed.
CUE_SCLEAN_FAILED Suite cleanup failed.
CUE_DUP_SUITE Duplicate suite name not allowed.
CUE_SUITE_INACTIVE A test run was requested for an inactive suite.
CUE_NOTEST A required CU_pTest of CU_TestFunc pointer was NULL.
CUE_NO_TESTNAME Required CU_Test name not provided.
CUE_DUP_TEST Duplicate test case name not allowed.
CUE_TEST_NOT_IN_SUITE Test is not registered in the specified suite.
CUE_TEST_INACTIVE A test run was requested for an inactive test.
CUE_FOPEN_FAILED An error occurred opening a file.
CUE_FCLOSE_FAILED An error occurred closing a file.
CUE_BAD_FILENAME A bad filename was requested (NULL?? empty?? nonexistent?? etc.).
CUE_WRITE_ERROR An error occurred during a write to a file
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11