[ CCUnit project page ] |  | [ CCUnit home page ]

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# CCUnitTestFixture.h

Go to the documentation of this file.

    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: CCUnitTestFixture.h,v 1.12 2010/08/20 00:27:02 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_setUp;
    00132   CCUnitTestFunc* setup_tearDown;
    00133   CCUnitTestFunc* setUp;
    00134   CCUnitTestFunc* tearDown;
    00135   CCUnitList testCases;
    00136 } CCUnitTestFixture;
    00137
    00141 typedef struct CCUnitTestFixtureDfn
    00142 {
    00143   CCUnitTestDfn test;
    00144   const char* name;
    00145   CCUnitTestFunc setup_setUp;
    00146   CCUnitTestFunc setup_tearDown;
    00147   CCUnitTestFunc setUp;
    00148   CCUnitTestFunc tearDown;
    00149   CCUnitTestFunc* testCases;
    00150 } CCUnitTestFixtureDfn;
    00151
    00161 extern CCUnitTestFixture* ccunit_newTestFixture (const char* name,
    00162                                                  CCUnitTestFunc* setUp,
    00163                                                  CCUnitTestFunc* tearDown);
    00164
    00173 extern inline void ccunit_setTestFixtureSetup (CCUnitTestFixture* fixture,
    00174                                                CCUnitTestFunc* setup_setUp,
    00175                                                CCUnitTestFunc* setup_tearDown);
    00176
    00184 extern inline void ccunit_addTestCase (CCUnitTestFixture* fixture,
    00185                                        CCUnitTestCase* testCase);
    00186
    00197 extern CCUnitTestCase* ccunit_addNewTestCase (CCUnitTestFixture* fixture,
    00198                                               const char* name,
    00199                                               const char* desc,
    00200                                               void (*runTest)());
    00201
    00208 extern inline struct CCUnitTestResult* ccunit_runTestFixture (CCUnitTestFixture* f);
    00209
    00211 #endif

| hosts this site. |  | Send comments to: CCUnit Developer |