CCUnit project page | CCUnit home page |
00001 /* -*- mode: C; -*- */ 00002 /* Copyright (C) 2003 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: CCUnitTestFixture.h,v 1.9 2003/10/05 11:29:59 tsutsumi Exp $ 00023 */ 00024 00029 #ifndef CCUNITTESTFIXTURE_H 00030 #define CCUNITTESTFIXTURE_H 00031 00032 #include <ccunit/CCUnitConfig.h> 00033 #include <ccunit/CCUnitList.h> 00034 #include <ccunit/CCUnitTest.h> 00035 #include <ccunit/CCUnitTestCase.h> 00036 #include <ccunit/CCUnitTestResult.h> 00037 00127 typedef struct CCUnitTestFixture 00128 { 00129 CCUnitTest test; 00130 const char* name; 00131 CCUnitTestFunc* setUp; 00132 CCUnitTestFunc* tearDown; 00133 CCUnitList testCases; 00134 } CCUnitTestFixture; 00135 00139 typedef struct CCUnitTestFixtureDfn 00140 { 00141 CCUnitTestDfn test; 00142 const char* name; 00143 CCUnitTestFunc setUp; 00144 CCUnitTestFunc tearDown; 00145 CCUnitTestFunc* testCases; 00146 } CCUnitTestFixtureDfn; 00147 00157 extern CCUnitTestFixture* ccunit_newTestFixture (const char* name, 00158 CCUnitTestFunc* setUp, 00159 CCUnitTestFunc* tearDown); 00160 00168 extern inline void ccunit_addTestCase (CCUnitTestFixture* fixture, 00169 CCUnitTestCase* testCase); 00170 00181 extern CCUnitTestCase* ccunit_addNewTestCase (CCUnitTestFixture* fixture, 00182 const char* name, 00183 const char* desc, 00184 void (*runTest)()); 00185 00192 extern inline struct CCUnitTestResult* ccunit_runTestFixture (CCUnitTestFixture* f); 00193 00195 #endif
|
hosts this site. |
Send comments to: CCUnit Developer |