Update of /cvsroot/mockpp/mockpp/mockpp/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30732/mockpp/tests
Modified Files:
Makefile.am UnlimitedMatcher_test.cpp
Added Files:
SelectFramework.h
Log Message:
framework optional
--- NEW FILE: SelectFramework.h ---
/***************************************************************************
SelectFramework.h - setup for unittest framework in use
-------------------
begin : Fri Dec 9 2005
copyright : (C) 2002-2005 by Ewald Arnold
email : mockpp at ewald-arnold dot de
$Id: SelectFramework.h,v 1.1 2005/12/09 15:55:36 ewald-arnold Exp $
***************************************************************************/
/**************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
***************************************************************************/
#if defined(HAVE_CXXTEST)
# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/
#elif defined(HAVE_CPPUNIT)
# include <cppunit/extensions/HelperMacros.h>
# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CppUnit::TestFixture
#else
# pragma message ("No unittest framework available at compile time")
# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/
#endif // HAVE_CPPUNIT
Index: UnlimitedMatcher_test.cpp
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/UnlimitedMatcher_test.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- UnlimitedMatcher_test.cpp 15 Oct 2005 15:40:59 -0000 1.3
+++ UnlimitedMatcher_test.cpp 9 Dec 2005 15:55:36 -0000 1.4
@@ -29,33 +29,35 @@
#include <mockpp/mockpp.h> // always first
-#ifndef HAVE_CPPUNIT
-
-# warning CppUnit not available at compile time
-
-#else
+#include "SelectFramework.h"
#include <mockpp/matcher/UnlimitedMatcher.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class UnlimitedMatcher_test : public CppUnit::TestFixture
+class UnlimitedMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK
{
public:
-CPPUNIT_TEST_SUITE( UnlimitedMatcher_test );
+#if defined (HAVE_CXXTEST)
- CPPUNIT_TEST(test_invoke);
+#elif defined(HAVE_CPPUNIT)
+CPPUNIT_TEST_SUITE( UnlimitedMatcher_test );
+ CPPUNIT_TEST(test_invoke);
CPPUNIT_TEST_SUITE_END();
+#endif // HAVE_CPPUNIT
+
public:
void test_invoke();
};
+#if defined (HAVE_CXXTEST)
+
+#elif defined(HAVE_CPPUNIT)
CPPUNIT_TEST_SUITE_REGISTRATION(UnlimitedMatcher_test);
+#endif
void UnlimitedMatcher_test::test_invoke()
@@ -84,4 +86,3 @@
}
-#endif // HAVE_CPPUNIT
Index: Makefile.am
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- Makefile.am 8 Dec 2005 17:33:40 -0000 1.90
+++ Makefile.am 9 Dec 2005 15:55:36 -0000 1.91
@@ -84,7 +84,7 @@
check_inst_SOURCES = check_inst.cpp
-noinst_HEADERS = classes_ABCDE.h MyBuilderNamespace.h MyMatchBuilder.h IncCounter.h
+noinst_HEADERS = SelectFramework.h classes_ABCDE.h MyBuilderNamespace.h MyMatchBuilder.h IncCounter.h
###########################################################################
|