[ CCUnit project page ] | [ CCUnit home page ] |
00001 /* -*- mode: C; -*- */ 00002 /* Copyright (C) 2003, 2010 TSUTSUMI Kikuo. 00003 This file is part of the CCUnit Library. 00004 00005 The CCUnit Library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public License 00007 as published by the Free Software Foundation; either version 2.1 of 00008 the License, or (at your option) any later version. 00009 00010 The CCUnit Library is distributed in the hope that it will be 00011 useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00012 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with the CCUnit Library; see the file COPYING.LESSER. 00017 If not, write to the Free Software Foundation, Inc., 59 Temple 00018 Place - Suite 330, Boston, MA 02111-1307, USA. 00019 */ 00020 00021 /* 00022 * $Id: CCUnitTestCase.h,v 1.15 2010/08/21 04:12:23 tsutsumi Exp $ 00023 */ 00024 00029 #ifndef CCUNITTESTCASE_H 00030 #define CCUNITTESTCASE_H 00031 00032 #include <ccunit/CCUnitConfig.h> 00033 #include <ccunit/CCUnitList.h> 00034 #include <ccunit/CCUnitTest.h> 00035 #include <ccunit/CCUnitTestFunc.h> 00036 #include <ccunit/CCUnitTestResult.h> 00037 00127 typedef struct CCUnitTestCase 00128 { 00129 CCUnitTest test; 00130 const char* name; 00131 CCUnitTestFunc* setup_setUp; 00132 CCUnitTestFunc* setup_tearDown; 00133 CCUnitTestFunc* setUp; 00134 CCUnitTestFunc* tearDown; 00135 CCUnitList testFuncs; 00136 } CCUnitTestCase; 00137 00141 typedef struct CCUnitTestCaseDfn 00142 { 00143 CCUnitTestDfn test; 00144 const char* name; 00145 CCUnitTestFunc* testFuncs; 00146 } CCUnitTestCaseDfn; 00147 00155 extern CCUnitTestCase* ccunit_newTestCase (const char* name); 00156 00162 extern inline void ccunit_deleteTestCase (CCUnitTestCase* testCase); 00163 00171 extern void ccunit_addTestFunc (CCUnitTestCase* testCase, CCUnitTestFunc* f); 00172 00183 extern CCUnitTestFunc* ccunit_addNewTestFunc (CCUnitTestCase* testCase, 00184 const char* name, 00185 const char* desc, 00186 void (*runTest)()); 00187 #define CCUNIT_ADDNEWTESTFUNC(TESTCASE, FN) ccunit_addNewTestFunc (TESTCASE, #FN, NULL, FN) 00188 00195 extern inline struct CCUnitTestResult* ccunit_runTestCase (CCUnitTestCase* testCase); 00196 00198 #endif
|
hosts this site. | Send comments to: CCUnit Developer |
Generated on Sun Aug 29 2010 10:59:33 for CCUnit by ![]() |