亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? testrun.c

?? CUNIT
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* *  CUnit - A Unit testing framework library for C. *  Copyright (C) 2001  Anil Kumar *  Copyright (C) 2004  Anil Kumar, Jerry St.Clair * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Library General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Library General Public License for more details. * *  You should have received a copy of the GNU Library General Public *  License along with this library; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *//* *  Contains the Console Test Interface  implementation. * *  Created By     : Anil Kumar on ...(in month of Aug 2001) *  Last Modified  : 19/Aug/2001 *  Comment        : Added initial registry/Suite/test framework implementation. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 24/Aug/2001 by Anil Kumar *  Comment        : Changed Data structure from SLL to DLL for all linked lists. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 25/Nov/2001 by Anil Kumar *  Comment        : Added failure notification for Suite Initialization failure condition. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 5-Aug-2004 (JDS) *  Comment        : New interface, doxygen comments, moved add_failure on suite *                   initialization so called even if a callback is not registered, *                   moved CU_assertImplementation into TestRun.c, consolidated *                   all run summary info out of CU_TestRegistry into TestRun.c, *                   revised counting and reporting of run stats to cleanly *                   differentiate suite, test, and assertion failures. *  Email          : jds2@users.sourceforge.net * *  Last Modified  : 1-Sep-2004 (JDS) *  Comment        : Modified CU_assertImplementation() and run_single_test() for *                   setjmp/longjmp mechanism of aborting test runs, add asserts in *                   CU_assertImplementation() to trap use outside a registered *                   test function during an active test run. *  Email          : jds2@users.sourceforge.net * *  Last Modified  : 22-Sep-2004 (JDS) *  Comment        : Initial implementation of internal unit tests, added nFailureRecords *                   to CU_Run_Summary, added CU_get_n_failure_records(), removed *                   requirement for registry to be initialized in order to run *                   CU_run_suite() and CU_run_test(). *  Email          : jds2@users.sourceforge.net *//** @file *  Test run management functions (implementation). *//** @addtogroup Framework @{*/#include <stdlib.h>#include <string.h>#include <assert.h>#include <stdio.h>#include <setjmp.h>#include "CUnit.h"#include "MyMem.h"#include "TestDB.h"#include "TestRun.h"static BOOL       f_bTestIsRunning = FALSE; /**< Flag for whether a test run is in progress */static CU_pSuite  f_pCurSuite = NULL;       /**< Pointer to the suite currently being run. */static CU_pTest   f_pCurTest  = NULL;       /**< Pointer to the test currently being run. *//** CU_RunSummary to hold results of each test run. */static CU_RunSummary f_run_summary = {0, 0, 0, 0, 0, 0, 0};/** CU_pFailureRecord to hold head of failure record list of each test run. */static CU_pFailureRecord f_failure_list = NULL;/** Keeps track of end of f_run_summary list for message handlers. */static CU_pFailureRecord f_last_failure = NULL;/* Forward declarations of static functions. */static void         clear_previous_results(CU_pRunSummary pRunSummary, CU_pFailureRecord* ppFailure);static void         cleanup_failure_list(CU_pFailureRecord* ppFailure);static CU_ErrorCode run_single_suite(CU_pSuite pSuite, CU_pRunSummary pRunSummary);static CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary);static void         add_failure(CU_pFailureRecord* ppFailure, CU_pRunSummary pRunSummary,                                unsigned int uiLineNumber, char szCondition[],                                char szFileName[], CU_pSuite pSuite, CU_pTest pTest);/** Pointer to the function to be called before running a test. */static CU_TestStartMessageHandler        f_pTestStartMessageHandler = NULL;/** Pointer to the function to be called after running a test. */static CU_TestCompleteMessageHandler     f_pTestCompleteMessageHandler = NULL;/** Pointer to the function to be called when all tests have been run. */static CU_AllTestsCompleteMessageHandler f_pAllTestsCompleteMessageHandler = NULL;/** Pointer to the function to be called if a suite initialization function returns an error. */static CU_SuiteInitFailureMessageHandler f_pSuiteInitFailureMessageHandler = NULL;/*------------------------------------------------------------------------*//** Assertion implementation function. * All CUnit assertions reduce to a call to this function. * It should only be called during an active test run (checked * by assertion).  This means that CUnit assertions should only * be used in registered test functions during a test run. * @param bValue        Value of the assertion (TRUE or FALSE). * @param uiLine        Line number of failed test statement. * @param strCondition  String containing logical test that failed. * @param strFile       Source file where test statement failed. * @param strFunction   Function where test statement failed. * @param bFatal        TRUE to abort test (via longjmp()), FALSE to continue test. * @return As a convenience, returns the value of the assertion. */BOOL CU_assertImplementation(BOOL bValue, unsigned int uiLine,                             char strCondition[], char strFile[],                             char strFunction[], BOOL bFatal){  /* not used in current implementation - stop compiler warning */  (void)strFunction;  /* these should always be non-NULL (i.e. a test run is in progress) */  assert(f_pCurSuite);  assert(f_pCurTest);  ++f_run_summary.nAsserts;  if (!bValue) {    ++f_run_summary.nAssertsFailed;    add_failure(&f_failure_list, &f_run_summary,                uiLine, strCondition, strFile, f_pCurSuite, f_pCurTest);    if (bFatal && f_pCurTest->pJumpBuf)      longjmp(*(f_pCurTest->pJumpBuf), 1);  }  return bValue;}/* * Get/Set functions for Message Handlers. *//*------------------------------------------------------------------------*//** Set the message handler to call before each test is run. */void CU_set_test_start_handler(CU_TestStartMessageHandler pTestStartHandler){  f_pTestStartMessageHandler = pTestStartHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call after each test is run. */void CU_set_test_complete_handler(CU_TestCompleteMessageHandler pTestCompleteHandler){  f_pTestCompleteMessageHandler = pTestCompleteHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call after all tests have been run. */void CU_set_all_test_complete_handler(CU_AllTestsCompleteMessageHandler pAllTestsCompleteHandler){  f_pAllTestsCompleteMessageHandler = pAllTestsCompleteHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call when a suite * initialization function returns an error. */void CU_set_suite_init_failure_handler(CU_SuiteInitFailureMessageHandler pSuiteInitFailureHandler){  f_pSuiteInitFailureMessageHandler = pSuiteInitFailureHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called before each test is run. */CU_TestStartMessageHandler CU_get_test_start_handler(void){  return f_pTestStartMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called after each test is run. */CU_TestCompleteMessageHandler CU_get_test_complete_handler(void){  return f_pTestCompleteMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called after all tests are run. */CU_AllTestsCompleteMessageHandler CU_get_all_test_complete_handler(void){  return f_pAllTestsCompleteMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called when a suite * initialization error occurs. */CU_SuiteInitFailureMessageHandler CU_get_suite_init_failure_handler(void){  return f_pSuiteInitFailureMessageHandler;}/* * Functions to get the Run statistics for the Test Run. *//*------------------------------------------------------------------------*//** Retrieve the number of suites completed during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_tests_run() */unsigned int CU_get_number_of_suites_run(void){  return f_run_summary.nSuitesRun;}/*------------------------------------------------------------------------*//** Retrieve the number of suites which failed to initialize * during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_tests_run() */unsigned int CU_get_number_of_suites_failed(void){  return f_run_summary.nSuitesFailed;}/*------------------------------------------------------------------------*//** Retrieve the number of tests completed during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_suites_run() */unsigned int CU_get_number_of_tests_run(void){  return f_run_summary.nTestsRun;}/*------------------------------------------------------------------------*//** Retrieve the number of tests which contained failed * assertions during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_suites_run() */unsigned int CU_get_number_of_tests_failed(void){  return f_run_summary.nTestsFailed;}/*------------------------------------------------------------------------*//** Retrieve the number of assertions processed during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_successes() * @see CU_get_number_of_failures() */unsigned int CU_get_number_of_asserts(void){  return f_run_summary.nAsserts;}/*------------------------------------------------------------------------*//** Retrieve the number of successful assertions during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_failures() */unsigned int CU_get_number_of_successes(void){  return (f_run_summary.nAsserts - f_run_summary.nAssertsFailed);}/*------------------------------------------------------------------------*//** Retrieve the number of failed assertions during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_successes() */unsigned int CU_get_number_of_failures(void){  return f_run_summary.nAssertsFailed;}/*------------------------------------------------------------------------*//** Retrieve the number failure records created during  * the previous run.  Note that this may be more than the * number of failed assertions, since failure records may also * be created for failed suite initialization and cleanup. * The count is reset each time the client initiates a run. */unsigned int CU_get_number_of_failure_records(void){  return f_run_summary.nFailureRecords;}/*------------------------------------------------------------------------*//** Retrieve the list of failures which occurred during * the last test run.  Note that the pointer returned * is invalidated when the client initiates a run using * CU_run_all_tests(), CU_run_suite(), or CU_run_test(). * @see CU_get_number_of_successes() */const CU_pFailureRecord CU_get_failure_list(void){  return f_failure_list;}/*------------------------------------------------------------------------*//** Retrieve the entire run summary for the last test run. * Note that the pFailure pointer in the run summary is * invalidated when the client initiates a run using * CU_run_all_tests(), CU_run_suite(), or CU_run_test(). * @see CU_get_number_of_successes() */const CU_pRunSummary CU_get_run_summary(void){  return &f_run_summary;}/* * Functions for running suites and tests. *//*------------------------------------------------------------------------*//** Run all tests in all suites registered in the test registry. * The suites are run in the order registered in the test registry. * For each registered suite, any initialization function is first * called, the suite is run using run_single_suite(), and finally * any  suite cleanup function is called.  If an error condition * (other than CUE_NOREGISTRY) occurs during the run, the action * depends on the current error action (see CU_set_error_action()). * @return A CU_ErrorCode indicating the first error condition *         encountered while running the tests. * @see CU_run_suite() to run the tests in a specific suite. * @see CU_run_test() for run a specific test only. */CU_ErrorCode CU_run_all_tests(void){  CU_pTestRegistry pRegistry = CU_get_registry();  CU_pSuite pSuite = NULL;  CU_ErrorCode result;  CU_ErrorCode result2;  CU_set_error(result = CUE_SUCCESS);  if (!pRegistry) {    CU_set_error(result = CUE_NOREGISTRY);  }  else {    /* test run is starting - set flag */    f_bTestIsRunning = TRUE;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利社在线观看| 国产精品国产自产拍高清av| 久久久久国产一区二区三区四区 | 中文无字幕一区二区三区| 亚洲男人的天堂在线aⅴ视频| 免费欧美日韩国产三级电影| 91视频.com| 久久久久久久久蜜桃| 蜜桃91丨九色丨蝌蚪91桃色| 91原创在线视频| 国产亚洲一区二区三区四区| 性欧美大战久久久久久久久| 91在线你懂得| 精品不卡在线视频| 久久黄色级2电影| 中文字幕日韩精品一区| 色婷婷久久综合| 免费观看久久久4p| 国产精品久久久久婷婷二区次| 成人毛片在线观看| 日韩激情中文字幕| 国产精品三级视频| 精品免费一区二区三区| 亚洲一区影音先锋| 国产激情偷乱视频一区二区三区| 91精品婷婷国产综合久久 | 欧美一区欧美二区| 亚洲综合在线第一页| 91在线精品一区二区| 国产午夜精品久久久久久免费视| 毛片av一区二区三区| 欧美一区二区日韩| 蜜桃在线一区二区三区| 欧美一区二区三区在线视频| 青椒成人免费视频| 日韩丝袜情趣美女图片| 日韩成人精品在线| 日韩视频永久免费| 日本欧美一区二区三区| 精品精品国产高清a毛片牛牛| 日韩va亚洲va欧美va久久| 91精品国产全国免费观看| 奇米色一区二区| 精品欧美一区二区在线观看| 裸体健美xxxx欧美裸体表演| 欧美电影免费观看高清完整版在线| 日精品一区二区| 精品国免费一区二区三区| 国产一区在线观看麻豆| 国产精品成人在线观看| 欧美中文字幕一区二区三区| 亚洲777理论| 久久久蜜桃精品| 99久久精品久久久久久清纯| 亚洲午夜国产一区99re久久| 777精品伊人久久久久大香线蕉| 韩日av一区二区| 亚洲人成7777| 日韩欧美亚洲另类制服综合在线 | www.欧美日韩| 欧美一区二区网站| 国产精品乱子久久久久| 亚洲福利一区二区| 日一区二区三区| 粉嫩绯色av一区二区在线观看| 欧美性猛交xxxxxx富婆| 99re热这里只有精品视频| 99久久er热在这里只有精品15 | 精品成人免费观看| 色综合久久九月婷婷色综合| 日韩电影免费在线观看网站| 欧美激情综合五月色丁香小说| 色成年激情久久综合| 另类人妖一区二区av| 亚洲免费在线观看视频| 精品日韩欧美在线| 一本久久精品一区二区| 国产精品一二三| 婷婷中文字幕一区三区| 中文字幕欧美三区| 正在播放一区二区| www.欧美精品一二区| 麻豆成人免费电影| 一区二区三区**美女毛片| 精品日本一线二线三线不卡| 欧美日韩在线电影| 成人一区二区三区在线观看| 五月婷婷欧美视频| 综合亚洲深深色噜噜狠狠网站| 欧美成人一区二区三区| 欧美揉bbbbb揉bbbbb| 成人av网站免费观看| 美日韩一区二区| 亚洲成av人影院| 亚洲欧美aⅴ...| 国产精品理论片| 久久久99精品久久| 日韩精品一区二区三区蜜臀| 日本韩国一区二区三区| fc2成人免费人成在线观看播放| 国产一区二区不卡| 美腿丝袜亚洲色图| 奇米精品一区二区三区四区| 亚洲午夜免费电影| 亚洲精品第1页| 亚洲同性gay激情无套| 国产精品视频免费| 久久久99久久| 夜色激情一区二区| 国产精品毛片大码女人| 国产精品一区二区无线| 国产真实乱对白精彩久久| 亚洲免费色视频| 日韩一区和二区| 国产乱人伦精品一区二区在线观看 | 亚洲动漫第一页| 欧美日韩亚洲综合| www.久久精品| 激情六月婷婷久久| 亚洲色图制服诱惑| 亚洲人成在线播放网站岛国| 亚洲欧洲精品天堂一级| 1024成人网色www| 亚洲私人影院在线观看| 1区2区3区国产精品| 国产精品入口麻豆原神| 亚洲欧洲日韩在线| 亚洲一区二区免费视频| 亚洲高清一区二区三区| 青青草原综合久久大伊人精品优势| 午夜电影一区二区三区| 蜜臀av一级做a爰片久久| 久久av老司机精品网站导航| 久久草av在线| 成人动漫中文字幕| 91在线视频观看| 欧美日韩国产一级二级| 日韩午夜小视频| 国产日产欧美一区二区视频| 欧美经典一区二区| 亚洲男女毛片无遮挡| 日韩中文字幕麻豆| 国产原创一区二区| 91理论电影在线观看| 7777精品伊人久久久大香线蕉超级流畅 | 欧美α欧美αv大片| 国产欧美日韩激情| 亚洲国产精品久久久久婷婷884| 日韩电影在线一区二区三区| 国产成人精品亚洲777人妖| 91一区在线观看| 91精品国产欧美一区二区| 欧美经典一区二区| 天天色 色综合| 国产麻豆午夜三级精品| 欧美亚洲动漫精品| 国产网站一区二区| 午夜视黄欧洲亚洲| 国产成人99久久亚洲综合精品| 欧美三级日韩三级国产三级| 久久久久青草大香线综合精品| 一个色在线综合| 粉嫩在线一区二区三区视频| 欧美精品 国产精品| 中文字幕精品一区| 捆绑变态av一区二区三区| 91在线国内视频| 国产夜色精品一区二区av| 亚洲第一福利视频在线| 成人国产精品免费观看动漫| 91精品国产欧美一区二区成人| 亚洲免费观看在线视频| 国产女主播视频一区二区| 日韩理论在线观看| 日本一区二区三区四区| 美国十次综合导航| 6080国产精品一区二区| 亚洲电影中文字幕在线观看| 91欧美一区二区| 国产精品三级久久久久三级| 日韩福利视频网| 色88888久久久久久影院野外| 国产精品欧美一区喷水| 国内不卡的二区三区中文字幕 | 午夜影院久久久| 国产成人精品aa毛片| 日韩女优制服丝袜电影| 亚洲va韩国va欧美va精品| 91丨九色丨蝌蚪丨老版| 日本一区二区三区四区| 国产乱码字幕精品高清av| 91精品国产日韩91久久久久久| 亚洲一级电影视频| 在线中文字幕不卡| 亚洲午夜在线视频| 在线亚洲+欧美+日本专区| 亚洲精品ww久久久久久p站| 99久久国产免费看| 专区另类欧美日韩| 色视频欧美一区二区三区|