Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

test_cunit.h

Go to the documentation of this file.
00001 /*
00002  *  CUnit - A Unit testing framework library for C.
00003  *  Copyright (C) 2004  Jerry St.Clair
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public
00016  *  License along with this library; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 /*
00021  *  Unit test for CUnit framework
00022  *
00023  *  Created By      : Jerry St.Clair
00024  *  Created on      : 12-Aug-2004
00025  *  Comment         : Initial implementation.
00026  *  Email           : jds2@users.sourceforge.net
00027  */
00028 
00041 #ifndef _TEST_CUNIT_CUNIT_H
00042 #define _TEST_CUNIT_CUNIT_H
00043 
00044 #include "CUnit.h"
00045 
00046 #ifdef CUNIT_BUILD_TESTS
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00060 void test_cunit_start_tests(const char* strName);
00061 
00065 void test_cunit_end_tests(void);
00066 
00067 void         test_cunit_add_test(void);       
00068 void         test_cunit_add_failure(void);    
00069 unsigned int test_cunit_test_count(void);     
00070 unsigned int test_cunit_failure_count(void);  
00072 BOOL test_cunit_assert_impl(BOOL value, const char* condition, const char* file, unsigned int line);
00073 
00081 #define TEST(x) test_cunit_assert_impl((x), #x, __FILE__, __LINE__)
00082 
00088 #define TEST_FATAL(x) if (!test_cunit_assert_impl((x), #x, __FILE__, __LINE__)) return
00089 
00091 #define FAIL(x) test_cunit_assert_impl(FALSE, #x, __FILE__, __LINE__)
00092 
00093 #ifdef __cplusplus
00094 }
00095 #endif
00096 
00097 #endif  /* CUNIT_BUILD_TESTS */
00098 
00099 #endif  /* _TEST_CUNIT_CUNIT_H */
00100 

Generated on Thu Apr 28 12:36:09 2005 for CUnit by  doxygen 1.3.9.1