cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 11)
Brought to you by:
blep
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(94) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(114) |
Mar
(80) |
Apr
|
May
|
Jun
(36) |
Jul
(67) |
Aug
(37) |
Sep
(33) |
Oct
(28) |
Nov
(91) |
Dec
(16) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
(45) |
Apr
|
May
|
Jun
(36) |
Jul
(7) |
Aug
|
Sep
(32) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
(29) |
Feb
(11) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(13) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(15) |
From: Baptiste L. <bl...@us...> - 2006-03-04 20:58:12
|
Update of /cvsroot/cppunit/cppunit/contrib/xml-xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19283/contrib/xml-xsl Modified Files: report.xsl Log Message: * contrib/xml-xsl/report.xsl: reported correction posted on the wiki. Index: report.xsl =================================================================== RCS file: /cvsroot/cppunit/cppunit/contrib/xml-xsl/report.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** report.xsl 19 Apr 2002 10:54:19 -0000 1.4 --- report.xsl 4 Mar 2006 20:58:04 -0000 1.5 *************** *** 1,5 **** <?xml version="1.0" encoding='shift_jis' standalone='yes' ?> ! <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0" xml:lang="ja"> <xsl:template match="/"> --- 1,5 ---- <?xml version="1.0" encoding='shift_jis' standalone='yes' ?> ! <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xml:lang="ja"> <xsl:template match="/"> *************** *** 67,72 **** </xsl:template> ! <xsl:template match="SucessfulTests"> ! <H2>SucessfulTests</H2> <xsl:choose> <xsl:when test="Test"> --- 67,72 ---- </xsl:template> ! <xsl:template match="SuccessfulTests"> ! <H2>SuccessfulTests</H2> <xsl:choose> <xsl:when test="Test"> |
From: Baptiste L. <bl...@us...> - 2006-03-04 20:58:10
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19283 Modified Files: ChangeLog NEWS Log Message: * contrib/xml-xsl/report.xsl: reported correction posted on the wiki. Index: NEWS =================================================================== RCS file: /cvsroot/cppunit/cppunit/NEWS,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** NEWS 6 Nov 2005 16:58:20 -0000 1.93 --- NEWS 4 Mar 2006 20:58:04 -0000 1.94 *************** *** 97,100 **** --- 97,102 ---- See xml-xsl/cppunit2junit.xsl and cppunit2junit.txt for details. + - xml-xsl/report.xsl has been fixed to work with current xml output. + * (Possible) Compatiblity break: Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -d -r1.243 -r1.244 *** ChangeLog 27 Nov 2005 18:32:30 -0000 1.243 --- ChangeLog 4 Mar 2006 20:58:04 -0000 1.244 *************** *** 1,2 **** --- 1,16 ---- + 2006-03-04 Baptiste Lepilleur <gai...@fr...> + * contrib/xml-xsl/report.xsl: reported correction posted on the wiki. + + 2006-02-04 Baptiste Lepilleur <gai...@fr...> + * include/cppunit/TestListener.h: + * src/qttestrunner/TestRunnerModel.cpp: removed compilation warning. + + 2006-02-01 Baptiste Lepilleur <gai...@fr...> + * examples/qt: integrated Ernst patch from qt examples. + + 2005-12-12 Baptiste Lepilleur <gai...@fr...> + * src/qttestrunner: integrated Ernst patch for QtTestRunner and Qt 3.x. + Enhanced qmake project files to handle multiple build configuration + 2005-11-27 Baptiste Lepilleur <gai...@fr...> * doc/cookbook.dox: fixed type (patch #1334567) |
From: Baptiste L. <bl...@us...> - 2006-03-03 07:54:59
|
Update of /cvsroot/cppunit/cppunit2/src/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30672/src/cpptl Modified Files: json_writer.cpp Log Message: * fixed compilation issue on non msvc 2005 platforms. Index: json_writer.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpptl/json_writer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** json_writer.cpp 1 Feb 2006 18:26:17 -0000 1.2 --- json_writer.cpp 3 Mar 2006 07:54:55 -0000 1.3 *************** *** 53,57 **** sprintf_s(buffer, sizeof(buffer), "%.16g", value); #else ! sprintf(buffer, "%.*g", precision, value); #endif return buffer; --- 53,57 ---- sprintf_s(buffer, sizeof(buffer), "%.16g", value); #else ! sprintf(buffer, "%.16g", value); #endif return buffer; |
From: Baptiste L. <bl...@us...> - 2006-02-04 16:53:43
|
Update of /cvsroot/cppunit/cppunit/src/qttestrunner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16488/src/qttestrunner Modified Files: TestRunnerModel.cpp Log Message: * removed compilation warning Index: TestRunnerModel.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/qttestrunner/TestRunnerModel.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestRunnerModel.cpp 13 Jul 2002 10:33:50 -0000 1.3 --- TestRunnerModel.cpp 4 Feb 2006 16:53:35 -0000 1.4 *************** *** 138,142 **** // Called from the TestRunnerThread. void ! TestRunnerModel::startTest( CPPUNIT_NS::Test *test ) { } --- 138,142 ---- // Called from the TestRunnerThread. void ! TestRunnerModel::startTest( CPPUNIT_NS::Test * /*test*/ ) { } *************** *** 155,159 **** // Called from the TestRunnerThread. void ! TestRunnerModel::endTest( CPPUNIT_NS::Test *test ) { int numberOfTestCaseRun; --- 155,159 ---- // Called from the TestRunnerThread. void ! TestRunnerModel::endTest( CPPUNIT_NS::Test * /*test*/ ) { int numberOfTestCaseRun; |
From: Baptiste L. <bl...@us...> - 2006-02-04 16:49:37
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14747/include/cppunit Modified Files: TestListener.h Log Message: * removed compilation warning Index: TestListener.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestListener.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestListener.h 29 Aug 2002 19:27:07 -0000 1.15 --- TestListener.h 4 Feb 2006 16:49:26 -0000 1.16 *************** *** 98,102 **** /// Called when just before a TestCase is run. ! virtual void startTest( Test *test ) {} /*! \brief Called when a failure occurs while running a test. --- 98,102 ---- /// Called when just before a TestCase is run. ! virtual void startTest( Test * /*test*/ ) {} /*! \brief Called when a failure occurs while running a test. *************** *** 105,120 **** * method call. Use TestFailure::clone() to create a duplicate. */ ! virtual void addFailure( const TestFailure &failure ) {} /// Called just after a TestCase was run (even if a failure occured). ! virtual void endTest( Test *test ) {} /*! \brief Called by a TestComposite just before running its child tests. */ ! virtual void startSuite( Test *suite ) {} /*! \brief Called by a TestComposite after running its child tests. */ ! virtual void endSuite( Test *suite ) {} /*! \brief Called by a TestRunner before running the test. --- 105,120 ---- * method call. Use TestFailure::clone() to create a duplicate. */ ! virtual void addFailure( const TestFailure & /*failure*/ ) {} /// Called just after a TestCase was run (even if a failure occured). ! virtual void endTest( Test * /*test*/ ) {} /*! \brief Called by a TestComposite just before running its child tests. */ ! virtual void startSuite( Test * /*suite*/ ) {} /*! \brief Called by a TestComposite after running its child tests. */ ! virtual void endSuite( Test * /*suite*/ ) {} /*! \brief Called by a TestRunner before running the test. *************** *** 126,131 **** * \param eventManager Event manager used for the test run. */ ! virtual void startTestRun( Test *test, ! TestResult *eventManager ) {} /*! \brief Called by a TestRunner after running the test. --- 126,131 ---- * \param eventManager Event manager used for the test run. */ ! virtual void startTestRun( Test * /*test*/, ! TestResult * /*eventManager*/ ) {} /*! \brief Called by a TestRunner after running the test. *************** *** 137,142 **** * \param eventManager Event manager used for the test run. */ ! virtual void endTestRun( Test *test, ! TestResult *eventManager ) {} }; --- 137,142 ---- * \param eventManager Event manager used for the test run. */ ! virtual void endTestRun( Test * /*test*/, ! TestResult * /*eventManager*/ ) {} }; |
From: Baptiste L. <bl...@us...> - 2006-02-01 21:11:07
|
Update of /cvsroot/cppunit/cppunit/examples/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27068/examples/qt Modified Files: ExampleTestCases.cpp ExampleTestCases.h Main.cpp qt_example.pro Added Files: make_example make_example.bat qt_example.sln qt_example.vcproj qt_example_dll.vcproj Removed Files: build.bat Log Message: examples/qt: integrated Ernst patch from qt examples. --- NEW FILE: make_example --- #!/bin/tcsh ########################################################################### # FILE: make_example # PURPOSE: Create Makefile from project file and then make QtTestRunner # example. ########################################################################### qmake qt_example.pro make distclean make Index: Main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/Main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Main.cpp 13 Mar 2004 10:52:27 -0000 1.3 --- Main.cpp 1 Feb 2006 21:10:59 -0000 1.4 *************** *** 8,12 **** QApplication app( argc, argv ); ! CPPUNIT_NS::QtUi::TestRunner runner; runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); runner.run( true ); --- 8,15 ---- QApplication app( argc, argv ); ! //CPPUNIT_NS::QtUi::TestRunner runner; ! ! CPPUNIT_NS::QtTestRunner runner; ! runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); runner.run( true ); --- NEW FILE: qt_example.sln --- Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qt_example", "qt_example.vcproj", "{84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleUnitTest_with_DLL", "qt_example_dll.vcproj", "{44077776-21C3-4271-A74A-1ED1CDA862A4}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}.Debug.ActiveCfg = Debug|Win32 {84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}.Debug.Build.0 = Debug|Win32 {84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}.Release.ActiveCfg = Release|Win32 {84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}.Release.Build.0 = Release|Win32 {44077776-21C3-4271-A74A-1ED1CDA862A4}.Debug.ActiveCfg = Debug|Win32 {44077776-21C3-4271-A74A-1ED1CDA862A4}.Debug.Build.0 = Debug|Win32 {44077776-21C3-4271-A74A-1ED1CDA862A4}.Release.ActiveCfg = Release|Win32 {44077776-21C3-4271-A74A-1ED1CDA862A4}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal --- build.bat DELETED --- --- NEW FILE: qt_example.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="qt_example" ProjectGUID="{84D9CB1F-5FD9-4794-BF6F-58DB10CCB8FD}" SccProjectName="" SccLocalPath=""> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\include;$(QTDIR)\include" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile="" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="cppunit.lib qttestrunner.lib qt-mt335.lib odbc32.lib odbccp32.lib" OutputFile=".\Release\qt_example.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib,$(QTDIR)\lib" IgnoreDefaultLibraryNames="libc" ProgramDatabaseFile="" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\Release/SampleUnitTest.tlb" HeaderFileName=""/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="2055"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\include;$(QTDIR)\include" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="0" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile="" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="cppunitd.lib qttestrunnerd.lib qt-mt335.lib odbc32.lib odbccp32.lib" OutputFile=".\Debug\qt_example.exe" LinkIncremental="0" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib,$(QTDIR)\lib" IgnoreDefaultLibraryNames="libc,libcd,msvcrt" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug\qt_example.pdb" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\Debug/SampleUnitTest.tlb" HeaderFileName=""/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="2055"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File RelativePath=".\ExampleTestCases.cpp"> </File> <File RelativePath=".\Main.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath=".\ExampleTestCases.h"> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> Index: ExampleTestCases.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/ExampleTestCases.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExampleTestCases.h 12 Dec 2005 07:40:09 -0000 1.1 --- ExampleTestCases.h 1 Feb 2006 21:10:59 -0000 1.2 *************** *** 1,4 **** ! #ifndef CPP_UNIT_EXAMPLETESTCASE_H ! #define CPP_UNIT_EXAMPLETESTCASE_H #include <cppunit/TestFixture.h> --- 1,4 ---- ! #ifndef CPP_UNIT_EXAMPLETESTCASES_H ! #define CPP_UNIT_EXAMPLETESTCASES_H #include <cppunit/TestFixture.h> *************** *** 7,40 **** /* * A test case that is designed to produce ! * example errors and failures * */ ! class ExampleTestCase : public CPPUNIT_NS::TestFixture { ! CPPUNIT_TEST_SUITE( ExampleTestCase ); CPPUNIT_TEST( example ); CPPUNIT_TEST( anotherExample ); CPPUNIT_TEST( testAdd ); CPPUNIT_TEST( testEquals ); CPPUNIT_TEST_SUITE_END(); - protected: ! double m_value1; ! double m_value2; public: ! void setUp (); protected: - void example (); - void anotherExample (); - void testAdd (); - void testDivideByZero (); - void testEquals (); }; - #endif --- 7,40 ---- /* * A test case that is designed to produce ! * example errors and failures. * */ ! class ExampleTestCases : public CPPUNIT_NS::TestFixture { ! CPPUNIT_TEST_SUITE( ExampleTestCases ); CPPUNIT_TEST( example ); CPPUNIT_TEST( anotherExample ); CPPUNIT_TEST( testAdd ); + CPPUNIT_TEST( testDivideByZero ); CPPUNIT_TEST( testEquals ); CPPUNIT_TEST_SUITE_END(); ! protected: + double m_value1; + double m_value2; public: ! void setUp (); protected: + void example (); + void anotherExample (); + void testAdd (); + void testDivideByZero (); + void testEquals (); }; #endif Index: ExampleTestCases.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/ExampleTestCases.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExampleTestCases.cpp 12 Dec 2005 07:40:09 -0000 1.1 --- ExampleTestCases.cpp 1 Feb 2006 21:10:59 -0000 1.2 *************** *** 1,7 **** #include "ExampleTestCases.h" ! CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTestCase ); ! void ExampleTestCase::example () { CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, 1.1, 0.05); --- 1,7 ---- #include "ExampleTestCases.h" ! CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTestCases ); ! void ExampleTestCases::example () { CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, 1.1, 0.05); *************** *** 10,20 **** } ! ! void ExampleTestCase::anotherExample () { CPPUNIT_ASSERT (1 == 2); } ! void ExampleTestCase::setUp () { m_value1 = 2.0; --- 10,19 ---- } ! void ExampleTestCases::anotherExample () { CPPUNIT_ASSERT (1 == 2); } ! void ExampleTestCases::setUp () { m_value1 = 2.0; *************** *** 22,26 **** } ! void ExampleTestCase::testAdd () { double result = m_value1 + m_value2; --- 21,25 ---- } ! void ExampleTestCases::testAdd () { double result = m_value1 + m_value2; *************** *** 28,33 **** } ! void ExampleTestCase::testEquals () { std::auto_ptr<long> l1 (new long (12)); --- 27,37 ---- } + void ExampleTestCases::testDivideByZero () + { + int zero = 0; + int result = 8 / zero; + } ! void ExampleTestCases::testEquals () { std::auto_ptr<long> l1 (new long (12)); --- NEW FILE: make_example.bat --- @REM make_example.bat @REM @REM Create Makefile from project file and then make QtTestRunner example. qmake qt_example.pro nmake distclean nmake --- NEW FILE: qt_example_dll.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="qt_example_dll" ProjectGUID="{44077776-21C3-4271-A74A-1ED1CDA862A4}" SccProjectName="" SccLocalPath=""> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Release|Win32" OutputDirectory=".\ReleaseDLL" IntermediateDirectory=".\ReleaseDLL" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\include;$(QTDIR)\include" PreprocessorDefinitions="QTTESTRUNNER_DLL;WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile="" AssemblerListingLocation=".\ReleaseDLL/" ObjectFile=".\ReleaseDLL/" ProgramDataBaseFileName=".\ReleaseDLL/" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="cppunit_dll.lib qttestrunner_dll.lib qt-mt335.lib odbc32.lib odbccp32.lib" OutputFile=".\ReleaseDLL\qt_example.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib;$(QTDIR)\lib" IgnoreDefaultLibraryNames="libc" ProgramDatabaseFile="" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\Release/SampleUnitTest.tlb" HeaderFileName=""/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="2055"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\DebugDLL" IntermediateDirectory=".\DebugDLL" ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\include;$(QTDIR)\include" PreprocessorDefinitions="QTTESTRUNNER_DLL;WIN32;_DEBUG;_CONSOLE" BasicRuntimeChecks="0" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile="" AssemblerListingLocation=".\DebugDLL/" ObjectFile=".\DebugDLL/" ProgramDataBaseFileName=".\DebugDLL/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="cppunitd_dll.lib qttestrunnerd_dll.lib qt-mt335.lib odbc32.lib odbccp32.lib" OutputFile=".\DebugDLL\qt_example.exe" LinkIncremental="0" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib;$(QTDIR)\lib" IgnoreDefaultLibraryNames="libc,libcd,msvcrt" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\DebugDLL\qt_example.pdb" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool" TypeLibraryName=".\Debug/SampleUnitTest.tlb" HeaderFileName=""/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="2055"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File RelativePath=".\ExampleTestCases.cpp"> </File> <File RelativePath=".\Main.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath=".\ExampleTestCases.h"> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> Index: qt_example.pro =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/qt_example.pro,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** qt_example.pro 12 Dec 2005 07:40:09 -0000 1.1 --- qt_example.pro 1 Feb 2006 21:10:59 -0000 1.2 *************** *** 15,23 **** CONFIG -= release ! #CONFIG += qt warn_on debug use_static #CONFIG += qt warn_on release use_static #CONFIG += qt warn_on debug use_dll ! CONFIG += qt warn_on release use_dll #---------------------------------------------------------------------- --- 15,27 ---- CONFIG -= release ! CONFIG += qt warn_on debug use_static #CONFIG += qt warn_on release use_static #CONFIG += qt warn_on debug use_dll ! #CONFIG += qt warn_on release use_dll ! ! ! CPPUNIT_LIB_DIR = ../../lib # Location of libraries ! #---------------------------------------------------------------------- *************** *** 26,40 **** win32 { use_dll { DEFINES += QTTESTRUNNER_DLL debug { OBJECTS_DIR = DebugDLL ! LIBS += ..\..\lib\cppunitd_dll.lib ! LIBS += ..\..\lib\qttestrunnerd_dll.lib } release { OBJECTS_DIR = ReleaseDLL ! LIBS += ..\..\lib\cppunit_dll.lib ! LIBS += ..\..\lib\qttestrunner_dll.lib } } --- 30,52 ---- win32 { + # Suppress program database creation (should better be done + # in the qmake spec file) + QMAKE_CXXFLAGS_DEBUG += /Z7 + QMAKE_CXXFLAGS_DEBUG -= -Gm + QMAKE_CXXFLAGS_DEBUG -= -Zi + } + + win32 { use_dll { DEFINES += QTTESTRUNNER_DLL debug { OBJECTS_DIR = DebugDLL ! LIBS += $${CPPUNIT_LIB_DIR}\cppunitd_dll.lib ! LIBS += $${CPPUNIT_LIB_DIR}\qttestrunnerd_dll.lib } release { OBJECTS_DIR = ReleaseDLL ! LIBS += $${CPPUNIT_LIB_DIR}\cppunit_dll.lib ! LIBS += $${CPPUNIT_LIB_DIR}\qttestrunner_dll.lib } } *************** *** 42,52 **** debug { OBJECTS_DIR = Debug ! LIBS += ..\..\lib\cppunitd.lib ! LIBS += ..\..\lib\qttestrunnerd.lib } release { OBJECTS_DIR = Release ! LIBS += ..\..\lib\cppunit.lib ! LIBS += ..\..\lib\qttestrunner.lib } } --- 54,64 ---- debug { OBJECTS_DIR = Debug ! LIBS += $${CPPUNIT_LIB_DIR}\cppunitd.lib ! LIBS += $${CPPUNIT_LIB_DIR}\qttestrunnerd.lib } release { OBJECTS_DIR = Release ! LIBS += $${CPPUNIT_LIB_DIR}\cppunit.lib ! LIBS += $${CPPUNIT_LIB_DIR}\qttestrunner.lib } } *************** *** 59,63 **** unix { ! message("NOT IMPLEMENTED YET!") } --- 71,86 ---- unix { ! debug { ! OBJECTS_DIR = .obj_debug ! use_static: LIBS += -L$${CPPUNIT_LIB_DIR} -lqttestrunnerd ! use_dll: LIBS += -L$${CPPUNIT_LIB_DIR} -lqttestrunnerd_shared ! LIBS += -L$${CPPUNIT_LIB_DIR} -lcppunit ! } ! release { ! OBJECTS_DIR = .obj_release ! use_static: LIBS += -L$${CPPUNIT_LIB_DIR} -lqttestrunner ! use_dll: LIBS += -L$${CPPUNIT_LIB_DIR} -lqttestrunner_shared ! LIBS += -L$${CPPUNIT_LIB_DIR} -lcppunit ! } } |
From: Baptiste L. <bl...@us...> - 2006-02-01 18:26:31
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10035/src/opentest Modified Files: serializer.cpp sharedmemorytransport.cpp Log Message: * worked-around security deprecation warning on VC++ 2005. Index: serializer.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/serializer.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** serializer.cpp 9 Nov 2005 22:59:09 -0000 1.12 --- serializer.cpp 1 Feb 2006 18:26:17 -0000 1.13 *************** *** 407,411 **** --- 407,415 ---- #endif // #ifdef DBL_DIG char buffer[precision * 2 + 32]; + #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. + int length = sprintf_s(buffer, sizeof(buffer), "%.*g", precision, value); + #else int length = sprintf(buffer, "%.*g", precision, value); + #endif if ( length == 0) return setError( "Failed to serialize double value (empty string)" ); Index: sharedmemorytransport.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/sharedmemorytransport.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sharedmemorytransport.cpp 31 Jan 2006 08:08:38 -0000 1.5 --- sharedmemorytransport.cpp 1 Feb 2006 18:26:17 -0000 1.6 *************** *** 382,388 **** --- 382,396 ---- throw SharedMemoryError( "Shared memory transport name too long." ); #ifdef _UNICODE // Use VC++ CRT extension to handle ansi->unicode conversion. + # ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. + nameLength_ = wprintf_s( nameBuffer_, sizeof(buffer), L"%S", transportName.c_str() ); + # else nameLength_ = wprintf( nameBuffer_, L"%S", transportName.c_str() ); + # endif #else + # ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. + nameLength_ = sprintf_s( nameBuffer_, sizeof(nameBuffer_), "%s", transportName.c_str() ); + # else nameLength_ = sprintf( nameBuffer_, "%s", transportName.c_str() ); + # endif #endif openSharedMemoryRegion(); |
From: Baptiste L. <bl...@us...> - 2006-02-01 18:26:30
|
Update of /cvsroot/cppunit/cppunit2/src/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10035/src/cpptl Modified Files: json_reader.cpp json_writer.cpp Log Message: * worked-around security deprecation warning on VC++ 2005. Index: json_reader.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpptl/json_reader.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** json_reader.cpp 7 Nov 2005 22:43:07 -0000 1.1 --- json_reader.cpp 1 Feb 2006 18:26:16 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- #include <assert.h> + #if _MSC_VER >= 1400 // VC++ 8.0 + #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. + #endif + namespace Json { Index: json_writer.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpptl/json_writer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** json_writer.cpp 7 Nov 2005 22:43:07 -0000 1.1 --- json_writer.cpp 1 Feb 2006 18:26:17 -0000 1.2 *************** *** 4,7 **** --- 4,11 ---- #include <stdio.h> + #if _MSC_VER >= 1400 // VC++ 8.0 + #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. + #endif + namespace Json { *************** *** 46,50 **** { char buffer[32]; ! sprintf( buffer, "%.16g", value ); return buffer; } --- 50,58 ---- { char buffer[32]; ! #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. ! sprintf_s(buffer, sizeof(buffer), "%.16g", value); ! #else ! sprintf(buffer, "%.*g", precision, value); ! #endif return buffer; } |
From: Baptiste L. <bl...@us...> - 2006-02-01 18:26:30
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10035/src/cpputtest Modified Files: assertstringtest.cpp Log Message: * worked-around security deprecation warning on VC++ 2005. Index: assertstringtest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/assertstringtest.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** assertstringtest.cpp 6 Sep 2005 07:31:42 -0000 1.5 --- assertstringtest.cpp 1 Feb 2006 18:26:17 -0000 1.6 *************** *** 3,6 **** --- 3,9 ---- #include <string.h> // use string.h for easier portability + #if _MSC_VER >= 1400 // VC++ 8.0 + #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. + #endif namespace { |
From: Baptiste L. <bl...@us...> - 2006-02-01 18:26:28
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10035/include/cpptl Modified Files: stringtools.h Log Message: * worked-around security deprecation warning on VC++ 2005. Index: stringtools.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/stringtools.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** stringtools.h 2 Jul 2005 20:27:35 -0000 1.8 --- stringtools.h 1 Feb 2006 18:26:16 -0000 1.9 *************** *** 181,185 **** #endif // #ifdef FLT_DIG char buffer[128]; ! sprintf(buffer, "%.*g", precision, v ); return buffer; } --- 181,189 ---- #endif // #ifdef FLT_DIG char buffer[128]; ! #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. ! sprintf_s(buffer, sizeof(buffer), "%.*g", precision, v); ! #else ! sprintf(buffer, "%.*g", precision, v); ! #endif return buffer; } *************** *** 193,197 **** #endif // #ifdef DBL_DIG char buffer[128]; ! sprintf(buffer, "%.*g", precision, v ); return buffer; } --- 197,205 ---- #endif // #ifdef DBL_DIG char buffer[128]; ! #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. ! sprintf_s(buffer, sizeof(buffer), "%.*g", precision, v); ! #else ! sprintf(buffer, "%.*g", precision, v); ! #endif return buffer; } *************** *** 205,209 **** #endif // #ifdef DBL_DIG char buffer[128]; ! sprintf(buffer, "%.*g", precision, v ); return buffer; } --- 213,221 ---- #endif // #ifdef DBL_DIG char buffer[128]; ! #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. ! sprintf_s(buffer, sizeof(buffer), "%.*g", precision, v); ! #else ! sprintf(buffer, "%.*g", precision, v); ! #endif return buffer; } |
From: Baptiste L. <bl...@us...> - 2006-01-31 08:08:46
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21157/src/opentest Modified Files: sharedmemorytransport.cpp Log Message: * fixed compilation error on VC 8.0 (AutoHandle was being copied). Index: sharedmemorytransport.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/sharedmemorytransport.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sharedmemorytransport.cpp 6 Sep 2005 07:31:42 -0000 1.4 --- sharedmemorytransport.cpp 31 Jan 2006 08:08:38 -0000 1.5 *************** *** 43,54 **** // ////////////////////////////////////////////////////////////////// ! class AutoHandle : public CppTL::NonCopyable { public: ! AutoHandle( HANDLE handle = 0 ) : handle_( handle ) { } ~AutoHandle() { --- 43,74 ---- // ////////////////////////////////////////////////////////////////// ! class AutoHandle { public: ! AutoHandle() ! : handle_( 0 ) ! { ! } ! ! explicit AutoHandle( HANDLE handle ) : handle_( handle ) { } + AutoHandle( const AutoHandle &other ) + : handle_( 0 ) + { + if ( other.handle_ ) + { + ::DuplicateHandle( GetCurrentProcess(), + other.handle_, + GetCurrentProcess(), + &handle_, + 0, + TRUE, // handle may be inherited by child process + DUPLICATE_SAME_ACCESS ); + } + } + ~AutoHandle() { *************** *** 64,73 **** AutoHandle &operator =( HANDLE handle ) { ! if ( handle_ ) ! ::CloseHandle( handle_ ); ! handle_ = handle; return *this; } private: HANDLE handle_; --- 84,101 ---- AutoHandle &operator =( HANDLE handle ) { ! if ( handle != handle_ ) ! { ! if ( handle_ ) ! ::CloseHandle( handle_ ); ! handle_ = handle; ! } return *this; } + AutoHandle &operator =( const AutoHandle &other ) + { + return *this = other.handle_; + } + private: HANDLE handle_; *************** *** 437,441 **** SharedMemoryTransportImpl::autoManage( HANDLE handle ) { ! handles_.push_back( handle ); return handle; } --- 465,470 ---- SharedMemoryTransportImpl::autoManage( HANDLE handle ) { ! AutoHandle autoHandle( handle ); ! handles_.push_back( autoHandle ); return handle; } |
From: Baptiste L. <bl...@us...> - 2005-12-12 07:40:18
|
Update of /cvsroot/cppunit/cppunit/src/qttestrunner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32369/src/qttestrunner Modified Files: TestFailureListViewItem.cpp TestRunnerDlgImpl.cpp Added Files: make_lib make_lib.bat qttestrunner.vcproj qttestrunner_dll.vcproj qttestrunnerlib.pro Removed Files: QtTestRunnerDll.pro build build.bat qttestrunner.pro Log Message: * integrated Ernst patch for QtTestRunner and Qt 3.x. * upgrade QtTestRunner to Qt 3.x * enhanced qmake project files to handle multiple build configuration --- NEW FILE: qttestrunner_dll.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="qttestrunner_dll" ProjectGUID="{0D1BB705-1AE7-395D-A78A-2012D1F25FC9}"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Release|Win32" OutputDirectory=".\ReleaseDLL" IntermediateDirectory=".\ReleaseDLL" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" AdditionalOptions="-Zm200 -GX -GX -w34100 -w34189" Optimization="1" AdditionalIncludeDirectories="..\..\include,$(QTDIR)\include,.,tmp\moc\,$(QTDIR)\mkspecs\win32-msvc.net" PreprocessorDefinitions="QTTESTRUNNER_DLL_BUILD, _WINDOWS,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT,NDEBUG,QT_NO_DEBUG" GeneratePreprocessedFile="0" MinimalRebuild="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="2" BufferSecurityCheck="FALSE" RuntimeTypeInfo="TRUE" AssemblerListingLocation=".\ReleaseDLL/" ObjectFile=".\ReleaseDLL/" ProgramDataBaseFileName=".\ReleaseDLL/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" IgnoreImportLibrary="FALSE" AdditionalDependencies="cppunit_dll.lib qt-mt335.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib" OutputFile=".\ReleaseDLL\qttestrunner_dll.dll" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib,$(QTDIR)\lib" DelayLoadDLLs="comdlg32.dll,oleaut32.dll,winmm.dll,wsock32.dll,winspool.dll" GenerateDebugInformation="FALSE" ProgramDatabaseFile="" SubSystem="2" BaseAddress="" TargetMachine="1"/> <Tool Name="VCMIDLTool" WarningLevel="0" DefaultCharType="0" EnableErrorChecks="1"/> <Tool Name="VCPostBuildEventTool" Description="Copying $(TargetName).dll and $(TargetName).lib to lib/" CommandLine="copy "$(TargetDir)$(TargetName).dll" ..\..\lib\"$(TargetName)".dll copy "$(TargetDir)$(TargetName).lib" ..\..\lib\"$(TargetName)".lib "/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\DebugDLL" IntermediateDirectory=".\DebugDLL" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" AdditionalOptions="-Zm200 -GX -GX -w34100 -w34189" Optimization="0" AdditionalIncludeDirectories="..\..\include,$(QTDIR)\include,.,$(QTDIR)\mkspecs\win32-msvc.net" PreprocessorDefinitions="QTTESTRUNNER_DLL_BUILD, _WINDOWS,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT" GeneratePreprocessedFile="0" MinimalRebuild="FALSE" ExceptionHandling="TRUE" RuntimeLibrary="3" BufferSecurityCheck="FALSE" RuntimeTypeInfo="TRUE" AssemblerListingLocation=".\DebugDLL/" ObjectFile=".\DebugDLL/" ProgramDataBaseFileName=".\DebugDLL/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="1" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" IgnoreImportLibrary="FALSE" AdditionalDependencies="cppunitd_dll.lib qt-mt335.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib" OutputFile=".\DebugDLL\qttestrunnerd_dll.dll" LinkIncremental="0" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib,$(QTDIR)\lib" GenerateDebugInformation="TRUE" ProgramDatabaseFile="" SubSystem="2" BaseAddress="" ImportLibrary=".\DebugDLL\qttestrunnerd_dll.lib" TargetMachine="1"/> <Tool Name="VCMIDLTool" WarningLevel="0" DefaultCharType="0" EnableErrorChecks="1"/> <Tool Name="VCPostBuildEventTool" Description="Copying $(TargetName).dll and $(TargetName).lib to lib/" CommandLine="copy "$(TargetDir)$(TargetName).dll" ..\..\lib\"$(TargetName)".dll copy "$(TargetDir)$(TargetName).lib" ..\..\lib\"$(TargetName)".lib "/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File RelativePath=".\MostRecentTests.cpp"> </File> <File RelativePath=".\QtTestRunner.cpp"> </File> <File RelativePath=".\TestBrowserDlgImpl.cpp"> </File> <File RelativePath=".\TestFailureInfo.cpp"> </File> <File RelativePath=".\TestFailureListViewItem.cpp"> </File> <File RelativePath=".\TestListViewItem.cpp"> </File> <File RelativePath=".\TestRunnerDlgImpl.cpp"> </File> <File RelativePath=".\TestRunnerFailureEvent.cpp"> </File> <File RelativePath=".\TestRunnerModel.cpp"> </File> <File RelativePath=".\TestRunnerModelThreadInterface.cpp"> </File> <File RelativePath=".\TestRunnerTestCaseRunEvent.cpp"> </File> <File RelativePath=".\TestRunnerThread.cpp"> </File> <File RelativePath=".\TestRunnerThreadEvent.cpp"> </File> <File RelativePath=".\TestRunnerThreadFinishedEvent.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath=".\MostRecentTests.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing MostRecentTests.h..." CommandLine="$(QTDIR)\bin\moc.exe .\MostRecentTests.h -o tmp\moc\moc_MostRecentTests.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_MostRecentTests.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing MostRecentTests.h..." CommandLine="$(QTDIR)\bin\moc.exe .\MostRecentTests.h -o tmp\moc\moc_MostRecentTests.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_MostRecentTests.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestBrowserDlgImpl.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestBrowserDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestBrowserDlgImpl.h -o tmp\moc\moc_TestBrowserDlgImpl.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestBrowserDlgImpl.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestBrowserDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestBrowserDlgImpl.h -o tmp\moc\moc_TestBrowserDlgImpl.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestBrowserDlgImpl.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestFailureInfo.h"> </File> <File RelativePath=".\TestFailureListViewItem.h"> </File> <File RelativePath=".\TestListViewItem.h"> </File> <File RelativePath=".\TestRunnerDlgImpl.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestRunnerDlgImpl.h -o tmp\moc\moc_TestRunnerDlgImpl.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerDlgImpl.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestRunnerDlgImpl.h -o tmp\moc\moc_TestRunnerDlgImpl.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerDlgImpl.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestRunnerFailureEvent.h"> </File> <File RelativePath=".\TestRunnerModel.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerModel.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestRunnerModel.h -o tmp\moc\moc_TestRunnerModel.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerModel.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerModel.h..." CommandLine="$(QTDIR)\bin\moc.exe .\TestRunnerModel.h -o tmp\moc\moc_TestRunnerModel.cpp " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerModel.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestRunnerModelThreadInterface.h"> </File> <File RelativePath=".\TestRunnerTestCaseRunEvent.h"> </File> <File RelativePath=".\TestRunnerThread.h"> </File> <File RelativePath=".\TestRunnerThreadEvent.h"> </File> <File RelativePath=".\TestRunnerThreadFinishedEvent.h"> </File> </Filter> <Filter Name="Generated MOC Files" Filter="cpp;c;cxx;moc"> <File RelativePath=".\tmp\moc\moc_MostRecentTests.cpp"> </File> <File RelativePath=".\tmp\moc\moc_testbrowserdlg.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestBrowserDlgImpl.cpp"> </File> <File RelativePath=".\tmp\moc\moc_testrunnerdlg.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestRunnerDlgImpl.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestRunnerModel.cpp"> </File> </Filter> <Filter Name="Generated UI Files"> <File RelativePath=".\testbrowserdlg.cpp"> </File> <File RelativePath=".\testbrowserdlg.h"> </File> <File RelativePath=".\testrunnerdlg.cpp"> </File> <File RelativePath=".\testrunnerdlg.h"> </File> </Filter> <Filter Name="Forms"> <File RelativePath=".\testbrowserdlg.ui"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testbrowserdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -o ".\testbrowserdlg.h" && $(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -i ".\testbrowserdlg.h" -o ".\testbrowserdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testbrowserdlg.h" -o "tmp\moc\moc_testbrowserdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testbrowserdlg.h";".\testbrowserdlg.cpp";"tmp\moc\moc_testbrowserdlg.cpp""/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testbrowserdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -o ".\testbrowserdlg.h" && $(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -i ".\testbrowserdlg.h" -o ".\testbrowserdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testbrowserdlg.h" -o "tmp\moc\moc_testbrowserdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testbrowserdlg.h";".\testbrowserdlg.cpp";"tmp\moc\moc_testbrowserdlg.cpp""/> </FileConfiguration> </File> <File RelativePath=".\testrunnerdlg.ui"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testrunnerdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -o ".\testrunnerdlg.h" && $(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -i ".\testrunnerdlg.h" -o ".\testrunnerdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testrunnerdlg.h" -o "tmp\moc\moc_testrunnerdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testrunnerdlg.h";".\testrunnerdlg.cpp";"tmp\moc\moc_testrunnerdlg.cpp""/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testrunnerdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -o ".\testrunnerdlg.h" && $(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -i ".\testrunnerdlg.h" -o ".\testrunnerdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testrunnerdlg.h" -o "tmp\moc\moc_testrunnerdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testrunnerdlg.h";".\testrunnerdlg.cpp";"tmp\moc\moc_testrunnerdlg.cpp""/> </FileConfiguration> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- build.bat DELETED --- --- NEW FILE: qttestrunner.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="qttestrunner" ProjectGUID="{C633317B-D39C-303A-AFC4-1B8782FD4E4C}"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" ConfigurationType="4" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" AdditionalOptions="-Zm200 -GX -GX -w34100 -w34189" Optimization="1" AdditionalIncludeDirectories="..\..\include,$(QTDIR)\include,.,$(QTDIR)\mkspecs\win32-msvc.net" PreprocessorDefinitions="QT_NO_DEBUG,NDEBUG,UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT,NDEBUG" GeneratePreprocessedFile="0" ExceptionHandling="TRUE" RuntimeLibrary="2" BufferSecurityCheck="FALSE" RuntimeTypeInfo="TRUE" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="0" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" OutputFile=".\Release\qttestrunner.lib" SuppressStartupBanner="TRUE"/> <Tool Name="VCMIDLTool" WarningLevel="0" DefaultCharType="0" EnableErrorChecks="1"/> <Tool Name="VCPostBuildEventTool" Description="Copying $(TargetName).lib to lib/" CommandLine="copy "$(TargetDir)$(TargetName).lib" ..\..\lib\"$(TargetName)".lib"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" ConfigurationType="4" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE"> <Tool Name="VCCLCompilerTool" AdditionalOptions="-Zm200 -GX -GX -w34100 -w34189" Optimization="0" AdditionalIncludeDirectories="..\..\include,$(QTDIR)\include,.,$(QTDIR)\mkspecs\win32-msvc.net" PreprocessorDefinitions="UNICODE,WIN32,QT_DLL,QT_THREAD_SUPPORT" GeneratePreprocessedFile="0" MinimalRebuild="FALSE" ExceptionHandling="TRUE" RuntimeLibrary="3" BufferSecurityCheck="FALSE" RuntimeTypeInfo="TRUE" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="1" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" OutputFile=".\Debug\qttestrunnerd.lib" SuppressStartupBanner="TRUE"/> <Tool Name="VCMIDLTool" WarningLevel="0" DefaultCharType="0" EnableErrorChecks="1"/> <Tool Name="VCPostBuildEventTool" Description="Copying $(TargetName).lib to lib/" CommandLine="copy "$(TargetDir)$(TargetName).lib" ..\..\lib\"$(TargetName)".lib "/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File RelativePath=".\MostRecentTests.cpp"> </File> <File RelativePath=".\QtTestRunner.cpp"> </File> <File RelativePath=".\TestBrowserDlgImpl.cpp"> </File> <File RelativePath=".\TestFailureInfo.cpp"> </File> <File RelativePath=".\TestFailureListViewItem.cpp"> </File> <File RelativePath=".\TestListViewItem.cpp"> </File> <File RelativePath=".\TestRunnerDlgImpl.cpp"> </File> <File RelativePath=".\TestRunnerFailureEvent.cpp"> </File> <File RelativePath=".\TestRunnerModel.cpp"> </File> <File RelativePath=".\TestRunnerModelThreadInterface.cpp"> </File> <File RelativePath=".\TestRunnerTestCaseRunEvent.cpp"> </File> <File RelativePath=".\TestRunnerThread.cpp"> </File> <File RelativePath=".\TestRunnerThreadEvent.cpp"> </File> <File RelativePath=".\TestRunnerThreadFinishedEvent.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath=".\MostRecentTests.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing MostRecentTests.h..." CommandLine="$(QTDIR)\bin\moc.exe -DQT_NO_DEBUG -DNDEBUG -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DNDEBUG -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\MostRecentTests.h" -o "tmp\moc\moc_MostRecentTests.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_MostRecentTests.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing MostRecentTests.h..." CommandLine="$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\MostRecentTests.h" -o "tmp\moc\moc_MostRecentTests.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_MostRecentTests.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestBrowserDlgImpl.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestBrowserDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe -DQT_NO_DEBUG -DNDEBUG -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DNDEBUG -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestBrowserDlgImpl.h" -o "tmp\moc\moc_TestBrowserDlgImpl.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestBrowserDlgImpl.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestBrowserDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestBrowserDlgImpl.h" -o "tmp\moc\moc_TestBrowserDlgImpl.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestBrowserDlgImpl.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestFailureInfo.h"> </File> <File RelativePath=".\TestFailureListViewItem.h"> </File> <File RelativePath=".\TestListViewItem.h"> </File> <File RelativePath=".\TestRunnerDlgImpl.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe -DQT_NO_DEBUG -DNDEBUG -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DNDEBUG -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestRunnerDlgImpl.h" -o "tmp\moc\moc_TestRunnerDlgImpl.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerDlgImpl.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerDlgImpl.h..." CommandLine="$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestRunnerDlgImpl.h" -o "tmp\moc\moc_TestRunnerDlgImpl.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerDlgImpl.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestRunnerFailureEvent.h"> </File> <File RelativePath=".\TestRunnerModel.h"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerModel.h..." CommandLine="$(QTDIR)\bin\moc.exe -DQT_NO_DEBUG -DNDEBUG -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DNDEBUG -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestRunnerModel.h" -o "tmp\moc\moc_TestRunnerModel.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerModel.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Moc'ing TestRunnerModel.h..." CommandLine="$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -I".\..\..\include" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\mkspecs\win32-msvc.net" ".\TestRunnerModel.h" -o "tmp\moc\moc_TestRunnerModel.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe" Outputs="tmp\moc\moc_TestRunnerModel.cpp"/> </FileConfiguration> </File> <File RelativePath=".\TestRunnerModelThreadInterface.h"> </File> <File RelativePath=".\TestRunnerTestCaseRunEvent.h"> </File> <File RelativePath=".\TestRunnerThread.h"> </File> <File RelativePath=".\TestRunnerThreadEvent.h"> </File> <File RelativePath=".\TestRunnerThreadFinishedEvent.h"> </File> </Filter> <Filter Name="Generated MOC Files" Filter="cpp;c;cxx;moc"> <File RelativePath=".\tmp\moc\moc_MostRecentTests.cpp"> </File> <File RelativePath=".\tmp\moc\moc_testbrowserdlg.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestBrowserDlgImpl.cpp"> </File> <File RelativePath=".\tmp\moc\moc_testrunnerdlg.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestRunnerDlgImpl.cpp"> </File> <File RelativePath=".\tmp\moc\moc_TestRunnerModel.cpp"> </File> </Filter> <Filter Name="Generated UI Files"> <File RelativePath=".\testbrowserdlg.cpp"> </File> <File RelativePath=".\testbrowserdlg.h"> </File> <File RelativePath=".\testrunnerdlg.cpp"> </File> <File RelativePath=".\testrunnerdlg.h"> </File> </Filter> <Filter Name="Forms"> <File RelativePath=".\testbrowserdlg.ui"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testbrowserdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -o ".\testbrowserdlg.h" && $(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -i ".\testbrowserdlg.h" -o ".\testbrowserdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testbrowserdlg.h" -o "tmp\moc\moc_testbrowserdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testbrowserdlg.h";".\testbrowserdlg.cpp";"tmp\moc\moc_testbrowserdlg.cpp""/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testbrowserdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -o ".\testbrowserdlg.h" && $(QTDIR)\bin\uic.exe ".\testbrowserdlg.ui" -i ".\testbrowserdlg.h" -o ".\testbrowserdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testbrowserdlg.h" -o "tmp\moc\moc_testbrowserdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testbrowserdlg.h";".\testbrowserdlg.cpp";"tmp\moc\moc_testbrowserdlg.cpp""/> </FileConfiguration> </File> <File RelativePath=".\testrunnerdlg.ui"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testrunnerdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -o ".\testrunnerdlg.h" && $(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -i ".\testrunnerdlg.h" -o ".\testrunnerdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testrunnerdlg.h" -o "tmp\moc\moc_testrunnerdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testrunnerdlg.h";".\testrunnerdlg.cpp";"tmp\moc\moc_testrunnerdlg.cpp""/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" Description="Uic'ing testrunnerdlg.ui..." CommandLine="$(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -o ".\testrunnerdlg.h" && $(QTDIR)\bin\uic.exe ".\testrunnerdlg.ui" -i ".\testrunnerdlg.h" -o ".\testrunnerdlg.cpp" && $(QTDIR)\bin\moc.exe ".\testrunnerdlg.h" -o "tmp\moc\moc_testrunnerdlg.cpp" " AdditionalDependencies="$(QTDIR)\bin\moc.exe;$(QTDIR)\bin\uic.exe" Outputs="".\testrunnerdlg.h";".\testrunnerdlg.cpp";"tmp\moc\moc_testrunnerdlg.cpp""/> </FileConfiguration> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- QtTestRunnerDll.pro DELETED --- Index: TestFailureListViewItem.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/qttestrunner/TestFailureListViewItem.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestFailureListViewItem.cpp 14 Oct 2001 12:23:31 -0000 1.1 --- TestFailureListViewItem.cpp 12 Dec 2005 07:40:09 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- _failure( failure ) { + setMultiLinesEnabled (true); } --- qttestrunner.pro DELETED --- --- build DELETED --- --- NEW FILE: qttestrunnerlib.pro --- #---------------------------------------------------------------------- # File: qttestrunnerlib.pro # Purpose: qmake config file for the QtTestRunner library. # The library is built as debug staticlib. Set the CONFIG # variable accordingly to build it differently. #---------------------------------------------------------------------- TEMPLATE = lib LANGUAGE = C++ # Get rid of possibly predefined options CONFIG -= debug CONFIG -= release CONFIG -= dll CONFIG -= staticlib CONFIG += qt warn_on debug staticlib #CONFIG += qt warn_on release staticlib #CONFIG += qt warn_on debug dll #CONFIG += qt warn_on release dll QTRUNNER_LIB = qttestrunner # Name of the library #---------------------------------------------------------------------- # MS Windows #---------------------------------------------------------------------- win32 { # Suppress program database creation (should better be done # in the qmake spec file) QMAKE_CXXFLAGS_DEBUG += /Z7 QMAKE_CXXFLAGS_DEBUG -= -Gm QMAKE_CXXFLAGS_DEBUG -= -Zi } win32 { MOC_DIR = tmp\moc UI_DIR = tmp\moc dll { DEFINES += QTTESTRUNNER_DLL_BUILD DLLDESTDIR = ..\..\lib debug { TARGET = $${QTRUNNER_LIB}d_dll QTRUNNER_IMPORTLIB = $${QTRUNNER_LIB}d_dll.lib OBJECTS_DIR = DebugDLL LIBS += ..\..\lib\cppunitd_dll.lib } release { TARGET = $${QTRUNNER_LIB}_dll QTRUNNER_IMPORTLIB = $${QTRUNNER_LIB}_dll.lib OBJECTS_DIR = ReleaseDLL LIBS += ..\..\lib\cppunit_dll.lib } DESTDIR = $${OBJECTS_DIR} QMAKE_CLEAN += $${QTRUNNER_IMPORTLIB} # Also copy the import library after build of the DLL QTRUNNER_IMPORTLIB = $${DESTDIR}-SEP-$${QTRUNNER_IMPORTLIB} QTRUNNER_IMPORTLIB ~= s/-SEP-/\/ QMAKE_POST_LINK = copy $${QTRUNNER_IMPORTLIB} $${DLLDESTDIR} } staticlib { DESTDIR = ..\..\lib debug { TARGET = $${QTRUNNER_LIB}d OBJECTS_DIR = Debug } release { TARGET = $${QTRUNNER_LIB} OBJECTS_DIR = Release } } } #---------------------------------------------------------------------- # Linux/Unix #---------------------------------------------------------------------- unix { MOC_DIR = .moc UI_DIR = .moc DESTDIR = ../../lib dll { debug { TARGET = $${QTRUNNER_LIB}d_shared OBJECTS_DIR = .obj_debug_shared LIBS += -L../../lib -lcppunit } release { TARGET = $${QTRUNNER_LIB}_shared OBJECTS_DIR = .obj_release_shared LIBS += -L../../lib -lcppunit } } staticlib { debug { TARGET = $${QTRUNNER_LIB}d OBJECTS_DIR = .obj_debug } release { TARGET = $${QTRUNNER_LIB} OBJECTS_DIR = .obj_release } } } #---------------------------------------------------------------------- HEADERS = \ MostRecentTests.h \ TestBrowserDlgImpl.h \ TestFailureInfo.h \ TestFailureListViewItem.h \ TestListViewItem.h \ TestRunnerDlgImpl.h \ TestRunnerFailureEvent.h \ TestRunnerModel.h \ TestRunnerModelThreadInterface.h \ TestRunnerTestCaseRunEvent.h \ TestRunnerThread.h \ TestRunnerThreadEvent.h \ TestRunnerThreadFinishedEvent.h \ ../../include/cppunit/ui/qt/TestRunner.h SOURCES = \ MostRecentTests.cpp \ TestBrowserDlgImpl.cpp \ TestFailureInfo.cpp \ TestFailureListViewItem.cpp \ TestListViewItem.cpp \ QtTestRunner.cpp \ TestRunnerDlgImpl.cpp \ TestRunnerFailureEvent.cpp \ TestRunnerModel.cpp \ TestRunnerModelThreadInterface.cpp \ TestRunnerTestCaseRunEvent.cpp \ TestRunnerThread.cpp \ TestRunnerThreadEvent.cpp \ TestRunnerThreadFinishedEvent.cpp INTERFACES = \ testbrowserdlg.ui \ testrunnerdlg.ui INCLUDEPATH += . ../../include Index: TestRunnerDlgImpl.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/qttestrunner/TestRunnerDlgImpl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestRunnerDlgImpl.cpp 5 Jul 2005 21:17:41 -0000 1.3 --- TestRunnerDlgImpl.cpp 12 Dec 2005 07:40:09 -0000 1.4 *************** *** 181,185 **** QListViewItem *item = new TestFailureListViewItem( failure, _listFailures ); - item->setMultiLinesEnabled( true ); item->setText( indexType, failure->isError() ? tr("Error") : tr("Failure") ); --- 181,184 ---- *************** *** 188,192 **** CPPUNIT_NS::Exception *thrownException = failure->thrownException(); ! item->setText( indexMessage, thrownException->what() ); item->setText( indexFilename, failure->sourceLine().fileName().c_str() ); item->setText( indexLineNumber, --- 187,192 ---- CPPUNIT_NS::Exception *thrownException = failure->thrownException(); ! //2.0 item->setText( indexMessage, thrownException->what() ); ! item->setText( indexMessage, QString(thrownException->what()).stripWhiteSpace() ); item->setText( indexFilename, failure->sourceLine().fileName().c_str() ); item->setText( indexLineNumber, --- NEW FILE: make_lib --- #!/bin/tcsh ########################################################################### # FILE: make_lib # PURPOSE: Create Makefile from project file and then make QtTestRunner # library. ########################################################################### qmake qttestrunnerlib.pro make distclean make --- NEW FILE: make_lib.bat --- @REM make_lib.bat @REM @REM Create Makefile from project file and then make QtTestRunner library. qmake qttestrunnerlib.pro nmake distclean nmake |
Update of /cvsroot/cppunit/cppunit/examples/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32369/examples/qt Modified Files: build.bat run.bat Added Files: ExampleTestCases.cpp ExampleTestCases.h qt_example.pro Removed Files: Example.pro ExampleTestCase.cpp ExampleTestCase.h Log Message: * integrated Ernst patch for QtTestRunner and Qt 3.x. * upgrade QtTestRunner to Qt 3.x * enhanced qmake project files to handle multiple build configuration --- Example.pro DELETED --- --- NEW FILE: qt_example.pro --- #---------------------------------------------------------------------- # File: qt_example.pro # Purpose: qmake config file for the QtTestRunner example. # The program is built with the QtTestRunner debug staticlib. # Set the CONFIG variable accordingly to build it differently. #---------------------------------------------------------------------- TEMPLATE = app LANGUAGE = C++ TARGET = qt_example # Get rid of possibly predefined options CONFIG -= debug CONFIG -= release #CONFIG += qt warn_on debug use_static #CONFIG += qt warn_on release use_static #CONFIG += qt warn_on debug use_dll CONFIG += qt warn_on release use_dll #---------------------------------------------------------------------- # MS Windows #---------------------------------------------------------------------- win32 { use_dll { DEFINES += QTTESTRUNNER_DLL debug { OBJECTS_DIR = DebugDLL LIBS += ..\..\lib\cppunitd_dll.lib LIBS += ..\..\lib\qttestrunnerd_dll.lib } release { OBJECTS_DIR = ReleaseDLL LIBS += ..\..\lib\cppunit_dll.lib LIBS += ..\..\lib\qttestrunner_dll.lib } } use_static { debug { OBJECTS_DIR = Debug LIBS += ..\..\lib\cppunitd.lib LIBS += ..\..\lib\qttestrunnerd.lib } release { OBJECTS_DIR = Release LIBS += ..\..\lib\cppunit.lib LIBS += ..\..\lib\qttestrunner.lib } } DESTDIR = $${OBJECTS_DIR} } #---------------------------------------------------------------------- # Linux/Unix #---------------------------------------------------------------------- unix { message("NOT IMPLEMENTED YET!") } #---------------------------------------------------------------------- HEADERS = \ ExampleTestCases.h SOURCES = \ ExampleTestCases.cpp \ Main.cpp INCLUDEPATH += . ../../include Index: build.bat =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/build.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.bat 14 Oct 2001 12:23:31 -0000 1.1 --- build.bat 12 Dec 2005 07:40:09 -0000 1.2 *************** *** 1,3 **** ! tmake Example.pro -o Makefile ! nmake clean nmake --- 1,2 ---- ! qmake qt_example.pro nmake --- ExampleTestCase.cpp DELETED --- --- ExampleTestCase.h DELETED --- --- NEW FILE: ExampleTestCases.cpp --- #include "ExampleTestCases.h" CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTestCase ); void ExampleTestCase::example () { CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, 1.1, 0.05); CPPUNIT_ASSERT (1 == 0); CPPUNIT_ASSERT (1 == 1); } void ExampleTestCase::anotherExample () { CPPUNIT_ASSERT (1 == 2); } void ExampleTestCase::setUp () { m_value1 = 2.0; m_value2 = 3.0; } void ExampleTestCase::testAdd () { double result = m_value1 + m_value2; CPPUNIT_ASSERT (result == 6.0); } void ExampleTestCase::testEquals () { std::auto_ptr<long> l1 (new long (12)); std::auto_ptr<long> l2 (new long (12)); CPPUNIT_ASSERT_EQUAL (12, 12); CPPUNIT_ASSERT_EQUAL (12L, 12L); CPPUNIT_ASSERT_EQUAL (*l1, *l2); CPPUNIT_ASSERT (12L == 12L); CPPUNIT_ASSERT_EQUAL (12, 13); CPPUNIT_ASSERT_DOUBLES_EQUAL (12.0, 11.99, 0.5); } Index: run.bat =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/qt/run.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** run.bat 14 Oct 2001 12:23:31 -0000 1.1 --- run.bat 12 Dec 2005 07:40:09 -0000 1.2 *************** *** 1,2 **** SET PATH=%PATH%;..\..\lib ! Example.exe \ No newline at end of file --- 1,2 ---- SET PATH=%PATH%;..\..\lib ! Debug\qt_example.exe --- NEW FILE: ExampleTestCases.h --- #ifndef CPP_UNIT_EXAMPLETESTCASE_H #define CPP_UNIT_EXAMPLETESTCASE_H #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> /* * A test case that is designed to produce * example errors and failures * */ class ExampleTestCase : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( ExampleTestCase ); CPPUNIT_TEST( example ); CPPUNIT_TEST( anotherExample ); CPPUNIT_TEST( testAdd ); CPPUNIT_TEST( testEquals ); CPPUNIT_TEST_SUITE_END(); protected: double m_value1; double m_value2; public: void setUp (); protected: void example (); void anotherExample (); void testAdd (); void testDivideByZero (); void testEquals (); }; #endif |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:49:54
|
Update of /cvsroot/cppunit/cppunit2/examples/opentest_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2315/examples/opentest_demo Modified Files: main.cpp Log Message: * reorganized code a bit Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/opentest_demo/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 11 Dec 2005 17:16:08 -0000 1.1 --- main.cpp 11 Dec 2005 17:49:14 -0000 1.2 *************** *** 1,308 **** #include <examples/common/examplecommon.h> ! #include <cpput/testcase.h> ! #include <opentest/connector.h> ! #include <opentest/interfaces.h> ! #include <stdio.h> ! ! namespace CppUT { ! ! class CppUTTestRuner : public OpenTest::TestRunnerInterface ! , private TestResultUpdater ! { ! public: ! CppUTTestRuner() ! : currentTestPlanId_( 0 ) ! { ! } ! ! void addTest( const TestPtr &test ) ! { ! tests_.push_back( test ); ! } ! ! public: // overridden from TestRunnerInterface ! virtual ~CppUTTestRuner() ! { ! } ! ! virtual void getTestDescriptions() ! { ! OpenTest::TestDescriptions descriptions; ! for ( Tests::const_iterator it = tests_.begin(); it != tests_.end(); ++it ) ! { ! addTestDescriptions( *it, descriptions ); ! } ! connector().testDriver().setTestDescriptions( descriptions ); ! } ! ! OpenTest::TestId allocateTestId( const TestPtr &test ) ! { ! OpenTest::TestId testId; ! IdsByTest::iterator it = idsByTest_.find( test ); ! if ( it == idsByTest_.end() ) ! { ! testId = OpenTest::TestId( idsByTest_.size() + 1 ); ! idsByTest_.insert( IdsByTest::value_type( test, testId ) ); ! testsById_.insert( TestsById::value_type( testId, test ) ); ! } ! else ! testId = it->second; ! return testId; ! } ! ! void setCommonTestDescription( const TestPtr &test, ! OpenTest::TestId testId, ! OpenTest::TestDescriptionCommon &description ) ! { ! description.name_ = test->name(); ! description.description_ = test->description(); ! // time-out ! // specifics ! } ! ! void addTestDescriptions( const TestPtr &test, ! OpenTest::TestDescriptions &descriptions ) ! { ! OpenTest::TestId testId = allocateTestId( test ); ! ! if ( test->isTestSuite() ) ! { ! OpenTest::TestSuiteDescription suiteDescription; ! setCommonTestDescription( test, testId, suiteDescription ); ! const AbstractTestSuite *suite = static_cast<AbstractTestSuite*>( test.get() ); ! for ( int index = 0; index < suite->testCount(); ++index ) ! { ! TestPtr childTest = suite->testAt(index); ! addTestDescriptions( childTest, descriptions ); ! suiteDescription.children_.push_back( allocateTestId( childTest ) ); ! } ! descriptions.testSuites_.insert( OpenTest::TestDescriptions::TestSuites::value_type( testId, suiteDescription ) ); ! } ! else ! { ! OpenTest::TestCaseDescription testCaseDescription; ! setCommonTestDescription( test, testId, testCaseDescription ); ! descriptions.testCases_.insert( OpenTest::TestDescriptions::TestCases::value_type( testId, testCaseDescription ) ); ! } ! } ! ! virtual void getTestPlans() ! { ! OpenTest::TestPlans plans; ! for ( TestsById::iterator it = testsById_.begin(); it != testsById_.end(); ++it ) ! { ! if ( it->second->isTestCase() ) ! { ! OpenTest::TestPlan plan; ! plan.testCase_ = it->first; ! plans.testPlans_.push_back( plan ); ! } ! } ! connector().testDriver().setDefaultTestPlans( plans ); ! } ! ! virtual void runTests( const OpenTest::TestPlans &plans ) ! { ! TestInfo::threadInstance().setTestResultUpdater( *this ); ! for ( OpenTest::TestPlans::Plans::const_iterator it = plans.testPlans_.begin(); it != plans.testPlans_.end(); ++it ) ! { ! const OpenTest::TestPlan &plan = *it; ! TestsById::const_iterator itTest = testsById_.find( plan.testCase_ ); ! if ( itTest != testsById_.end() ) ! { ! currentTestPlanId_ = OpenTest::TestPlanId( it - plans.testPlans_.begin() ); ! TestPtr test = itTest->second; ! if ( test->isTestCase() ) ! { ! AbstractTestCase &testCase = static_cast<AbstractTestCase &>(*test); ! connector().testDriver().startTesting( currentTestPlanId_ ); ! testCase.runTest(); ! publishTestResult(); ! } ! } ! } ! TestInfo::threadInstance().removeTestResultUpdater(); ! } ! ! void publishTestResult() ! { ! OpenTest::ResultStatus status; ! const TestStatus &actualStatus = TestInfo::threadInstance().testStatus(); ! switch ( actualStatus.status() ) ! { ! case TestStatus::passed: ! status.status_ = "passed"; ! break; ! case TestStatus::failed: ! status.status_ = "failed"; ! break; ! case TestStatus::skipped: ! status.status_ = "skipped"; ! break; ! default: ! CPPTL_DEBUG_ASSERT_UNREACHABLE; ! } ! status.statistics_["assertionCount"] = actualStatus.assertionCount(); ! status.statistics_["failedAssertionCount"] = actualStatus.failedAssertionCount(); ! status.statistics_["ignoredFailureCount"] = actualStatus.ignoredFailureCount(); ! connector().testDriver().setTestResult( currentTestPlanId_, status ); ! } ! ! virtual void stopTests() ! { ! } ! ! private: // overridden from TestResultUpdater ! virtual void addResultLog( const Json::Value &log ) ! { ! OpenTest::ResultLog result; ! result.log_ = log; ! connector().testDriver().addResultLog( currentTestPlanId_, result ); ! } ! ! virtual void addResultAssertion( const Assertion &assertion ) ! { ! OpenTest::ResultAssertion result; ! result.assertionType_ = (assertion.kind() == Assertion::fault) ? "fault" ! : "assertion"; ! result.assertionFormat_ = "generic"; ! result.message_ = assertion.messages().toString(); ! result.specific_ = assertion.testData(); ! result.isIgnoredFailure_ = assertion.isIgnoredFailure(); ! connector().testDriver().addResultAssertion( currentTestPlanId_, result ); ! } ! ! private: ! typedef std::map<OpenTest::TestId,TestPtr> TestsById; ! typedef std::map<TestPtr,OpenTest::TestId> IdsByTest; ! typedef std::deque<TestPtr> Tests; ! Tests tests_; ! OpenTest::TestPlanId currentTestPlanId_; ! TestsById testsById_; ! IdsByTest idsByTest_; ! }; ! } // namespace CppUT ! ! ! namespace OpenTest ! { ! ! typedef CppTL::IntrusivePtr<OpenTest::TestRunnerInterface> TestRunnerInterfacePtr; ! ! class TestDriver : private TestDriverInterface ! { ! public: ! TestDriver( int argc, const char *argv[] ) ! { ! } ! ! virtual ~TestDriver() ! { ! } ! ! void addTestRunner( TestRunnerInterface &testRunner ) ! { ! addConnector( new DirectConnector( testRunner, *this ) ); ! } ! ! void addConnector( const ConnectorPtr &connector ) ! { ! connectors_.push_back( connector ); ! } ! ! void runTests() ! { ! for ( Connectors::iterator it = connectors_.begin(); ! it != connectors_.end(); ! ++it ) ! { ! Connector &connector = **it; ! if ( connector.status().status_ != connectionEstablished ) ! connector.establishConnection(); ! } ! ! for ( Connectors::iterator it = connectors_.begin(); ! it != connectors_.end(); ! ++it ) ! { ! Connector &connector = **it; ! if ( connector.status().status_ == connectionEstablished ) ! { ! connector.testRunner().getTestDescriptions(); ! connector.testRunner().getTestPlans(); ! connector.testRunner().runTests(plans_); ! } ! } ! } ! ! private: // overridden from TestDriverInterface ! virtual void setTestDescriptions( const TestDescriptions &tests ) ! { ! descriptions_ = tests; ! } ! ! virtual void setDefaultTestPlans( const TestPlans &plans ) ! { ! plans_ = plans; ! } ! ! virtual void startTesting( TestPlanId testPlan ) ! { ! printf( "Start testing: %s\n", getTestCaseDesc( testPlan ).name_.c_str() ); ! } ! ! virtual void addResultLog( TestPlanId testPlan, ! const ResultLog &log ) ! { ! printf( "Log for %s:\n", ! getTestCaseDesc( testPlan ).name_.c_str() ); ! } ! ! virtual void addResultAssertion( TestPlanId testPlan, ! const ResultAssertion &assertion ) ! { ! printf( "- Assertion for %s:\n" ! "Type:%s\n" ! "Message:\n%s\n", ! getTestCaseDesc( testPlan ).name_.c_str(), ! assertion.assertionType_.c_str(), ! assertion.message_.c_str() ); ! } ! ! virtual void setResultInputActualOutput( TestPlanId testPlan, ! const ResultInputOutput &output ) ! { ! } ! ! virtual void setTestResult( TestPlanId testPlan, ! const ResultStatus &status ) ! { ! printf( "Result for %s:\n%s\n", ! getTestCaseDesc( testPlan ).name_.c_str(), ! status.status_.c_str() ); ! } ! ! virtual void testPlanDone( TestPlanId id ) ! { ! } ! ! private: ! OpenTest::TestCaseDescription &getTestCaseDesc( TestPlanId testPlan ) ! { ! TestId testId = plans_.testPlans_.at( testPlan ).testCase_; ! TestDescriptions::TestCases::iterator it = descriptions_.testCases_.find( testId ); ! if ( it == descriptions_.testCases_.end() ) ! throw std::runtime_error( "Invalid test plan" ); ! return it->second; ! } ! ! typedef std::deque<ConnectorPtr> Connectors; ! Connectors connectors_; ! OpenTest::TestPlans plans_; ! OpenTest::TestDescriptions descriptions_; ! }; ! }; ! ! // Checking assertion do not abort the test uppon failure: --- 1,5 ---- #include <examples/common/examplecommon.h> ! #include <cpput/opentestadaptor.h> ! #include <opentest/texttestdriver.h> // Checking assertion do not abort the test uppon failure: *************** *** 318,321 **** --- 15,27 ---- } + static void testLogDemo() + { + for ( int index =0; index < 5; ++index ) + { + CppUT::log( "index is " + CppTL::toString(index) ); + CPPUT_CHECK_EXPR( index % 2 == 0 ); + } + } + *************** *** 325,332 **** allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ), "testBasicCheckingAssertion" ) ); ! CppUT::CppUTTestRuner runner; runner.addTest( allSuite.get() ); ! OpenTest::TestDriver driver( argc, argv ); driver.addTestRunner( runner ); return driver.runTests(); --- 31,40 ---- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ), "testBasicCheckingAssertion" ) ); ! allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testLogDemo ), ! "testLogDemo" ) ); ! CppUT::OpenTestAdaptor runner; runner.addTest( allSuite.get() ); ! OpenTest::TextTestDriver driver( argc, argv ); driver.addTestRunner( runner ); return driver.runTests(); |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:49:28
|
Update of /cvsroot/cppunit/cppunit2/include/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2315/include/opentest Modified Files: texttestdriver.h Log Message: * reorganized code a bit Index: texttestdriver.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/texttestdriver.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** texttestdriver.h 28 Feb 2005 22:11:55 -0000 1.10 --- texttestdriver.h 11 Dec 2005 17:49:18 -0000 1.11 *************** *** 2,263 **** # define OPENTEST_TEXTTESTDRIVER_H_INCLUDED ! # include <opentest/properties.h> ! # include <opentest/testplan.h> ! # include <opentest/testrunner.h> ! # include <cpptl/enumerator.h> ! # include <deque> ! # include <map> ! # include <set> ! ! namespace OpenTest { ! ! class OPENTEST_API TestDriverTestPlan : public TestPlan ! { ! public: // overriden from TestPlan ! TestPlanEntryPtrEnum entries() const; ! ! public: ! void add( const TestPlanEntryPtr &entry ); ! ! private: ! std::deque<TestPlanEntryPtr> entries_; ! }; ! ! ! class OPENTEST_API TestResult ! { ! public: ! TestResult( TestPlanEntryId id, TestId test ); ! ! TestPlanEntryId id() const; ! ! TestId test() const; ! ! const Properties &result() const; ! ! Properties &result(); ! ! private: ! TestPlanEntryId id_; ! TestId test_; ! Properties result_; ! }; ! ! ! class OPENTEST_API TestDriverTestPlanEntry : public TestPlanEntry ! { ! public: ! TestDriverTestPlanEntry( TestPlanEntryId id, ! TestId test, ! const Properties &configuration ); ! ! public: // overriden from TestPlanEntry ! TestPlanEntryId id() const; ! ! /// Test to run ! TestId test() const; ! ! /// Used to pass configuration data to the test runner or the test itself ! const Properties &configuration() const; ! ! private: ! TestPlanEntryId id_; ! TestId test_; ! Properties configuration_; ! }; ! ! class TestInfo; ! class TestCaseInfo; ! class TestSuiteInfo; ! ! typedef CppTL::AnyEnumerator<TestInfo> TestInfoEnumerator; ! ! class TestInfoHolder ! { ! public: ! virtual ~TestInfoHolder() ! { ! } ! ! virtual const String &getTestName( TestId id ) const = 0; ! virtual PropertiesAccessor getTestDescription( TestId id ) const = 0; ! virtual PropertiesAccessor getTestInput( TestId id ) const = 0; ! virtual bool isTestSuite( TestId id ) const = 0; ! virtual TestInfoEnumerator getTestChildren( TestId id ) const = 0; ! virtual TestInfoEnumerator getTestParents( TestId id ) const = 0; ! }; ! ! ! class OPENTEST_API TestInfo ! { ! public: ! TestInfo( const TestInfoHolder &holder, ! TestId id ); ! ! virtual ~TestInfo() ! { ! } ! ! const String &getName() const; ! PropertiesAccessor getDescription() const; ! bool isTestSuite() const; ! bool isTestCase() const; ! TestInfoEnumerator getParents() const; ! ! // test case specifics ! PropertiesAccessor getInput() const; ! ! // test suite specifics ! TestInfoEnumerator getChildren() const; ! TestInfoEnumerator getChildTestSuites() const; ! TestInfoEnumerator getChildTestCases() const; ! ! protected: ! const TestInfoHolder &holder_; ! TestId id_; ! }; ! class OPENTEST_API TestInfoExplorer { ! public: ! virtual ~TestInfoExplorer() { ! } ! ! virtual TestInfoEnumerator getAllTestCases() const = 0; ! virtual TestInfoEnumerator getAllTestSuites() const = 0; ! virtual TestInfo getRootTestSuite() const = 0; ! }; ! ! ! ! class OPENTEST_API TextTestDriver : private TestRunTracker ! , private TestDeclarator ! , private TestInfoHolder ! , public TestInfoExplorer ! { ! public: ! TextTestDriver( TestRunner &runner ); ! ! // void selectTest( const CppTL::ConstString &name ); ! ! bool run(); ! ! public: // overridden from TestInfoExplorer ! TestInfoEnumerator getAllTestCases() const; ! TestInfoEnumerator getAllTestSuites() const; ! TestInfo getRootTestSuite() const; ! ! private: // overridden from TestDeclarator ! TestId beginSuite( const CppTL::ConstString &name, ! const Properties &data ); ! ! TestId addTest( const CppTL::ConstString &name, ! const Properties &data ); ! ! void endSuite(); ! private: // overriden from TestRunTracker ! void startTestRun(); ! void startTest( const TestPlanEntry &testEntry ); ! void mergeInTestResult( const TestPlanEntry &testEntry, ! const Properties &result ); ! void mergeInTestResult( const TestPlanEntry &testEntry, ! const PropertyPath &path, ! const Value &value ); ! void appendToTestResult( const TestPlanEntry &testEntry, ! const PropertyPath &path, ! const Value &value ); ! void endTest( const TestPlanEntry &testEntry ); ! void endTestRun(); ! bool shouldStopTestRun(); ! void aqcuireResources( const ResourceList &resources ) {} ! void releaseResources( const ResourceList &resources ) {} ! private: // overridden from TestInfoHolder ! const String &getTestName( TestId id ) const; ! PropertiesAccessor getTestDescription( TestId id ) const; ! PropertiesAccessor getTestInput( TestId id ) const; ! bool isTestSuite( TestId id ) const; ! TestInfoEnumerator getTestChildren( TestId id ) const; ! TestInfoEnumerator getTestParents( TestId id ) const; ! public: ! typedef std::deque<TestId> ParentSuites; ! private: ! struct InternalTestInfo ! { ! InternalTestInfo( TestId id, ! const CppTL::ConstString &name, ! const Properties &info, ! const ParentSuites &parents ) ! : id_( id ) ! , name_( name ) ! , info_( info ) ! , parents_( parents ) { } ! TestId id_; ! CppTL::ConstString name_; ! Properties info_; ! ParentSuites parents_; ! ParentSuites children_; }; - - typedef std::set<TestId> Tests; - typedef std::deque<TestResult> Results; - typedef std::vector<unsigned int> TestResultIndexes; - typedef std::map<TestId,InternalTestInfo> TestInfos; - - TestId nextTestId(); - - void outputFailures(); - - const InternalTestInfo &getTestInfo( TestId id ) const; - InternalTestInfo &getTestInfo( TestId id ); - - void declareTestOrSuite( TestId id, - const CppTL::ConstString &name, - const Properties &data ); - - CppTL::ConstString getTestPath( TestId test, unsigned int maxParent = (unsigned int)-1 ) const; - - void reportFailure( const TestResult &testResult, - const Properties &failure, - bool isAssertion ); - - TestRunner &runner_; - /// Information associated to each test/suite at declaration time - TestInfos testInfos_; - /// TestId of all test cases. - Tests tests_; - /// TestId of all suites. - Tests suites_; - /// Stack of parent suite for 'current' declared test. - ParentSuites declaratorParentSuites_; - /// List of test to run. - Tests testsToRun_; - Results results_; - TestResultIndexes failures_; - TestResultIndexes successes_; - TestId nextTestId_; }; - } // namespace OpenTest - - #endif // OPENTEST_TEXTTESTDRIVER_H_INCLUDED --- 2,127 ---- # define OPENTEST_TEXTTESTDRIVER_H_INCLUDED ! # include <opentest/connector.h> ! # include <opentest/interfaces.h> ! # include <stdio.h> ! namespace OpenTest { ! class TextTestDriver : private TestDriverInterface { ! public: ! TextTestDriver( int argc, const char *argv[] ) ! { ! } ! virtual ~TextTestDriver() ! { ! } ! void addTestRunner( TestRunnerInterface &testRunner ) ! { ! addConnector( new DirectConnector( testRunner, *this ) ); ! } ! void addConnector( const ConnectorPtr &connector ) ! { ! connectors_.push_back( connector ); ! } ! void runTests() ! { ! for ( Connectors::iterator it = connectors_.begin(); ! it != connectors_.end(); ! ++it ) ! { ! Connector &connector = **it; ! if ( connector.status().status_ != connectionEstablished ) ! connector.establishConnection(); ! } ! for ( Connectors::iterator it = connectors_.begin(); ! it != connectors_.end(); ! ++it ) ! { ! Connector &connector = **it; ! if ( connector.status().status_ == connectionEstablished ) ! { ! connector.testRunner().getTestDescriptions(); ! connector.testRunner().getTestPlans(); ! connector.testRunner().runTests(plans_); ! } ! } ! } ! private: // overridden from TestDriverInterface ! virtual void setTestDescriptions( const TestDescriptions &tests ) ! { ! descriptions_ = tests; ! } ! virtual void setDefaultTestPlans( const TestPlans &plans ) ! { ! plans_ = plans; ! } ! virtual void startTesting( TestPlanId testPlan ) ! { ! printf( "Start testing: %s\n", getTestCaseDesc( testPlan ).name_.c_str() ); ! } ! virtual void addResultLog( TestPlanId testPlan, ! const ResultLog &log ) ! { ! printf( "Log for %s:\n", ! getTestCaseDesc( testPlan ).name_.c_str() ); ! } ! virtual void addResultAssertion( TestPlanId testPlan, ! const ResultAssertion &assertion ) ! { ! printf( "- Assertion for %s:\n" ! "Type:%s\n" ! "Message:\n%s\n", ! getTestCaseDesc( testPlan ).name_.c_str(), ! assertion.assertionType_.c_str(), ! assertion.message_.c_str() ); ! } ! virtual void setResultInputActualOutput( TestPlanId testPlan, ! const ResultInputOutput &output ) ! { ! } ! virtual void setTestResult( TestPlanId testPlan, ! const ResultStatus &status ) ! { ! printf( "Result for %s:\n%s\n", ! getTestCaseDesc( testPlan ).name_.c_str(), ! status.status_.c_str() ); ! } ! virtual void testPlanDone( TestPlanId id ) ! { ! } ! private: ! OpenTest::TestCaseDescription &getTestCaseDesc( TestPlanId testPlan ) { + TestId testId = plans_.testPlans_.at( testPlan ).testCase_; + TestDescriptions::TestCases::iterator it = descriptions_.testCases_.find( testId ); + if ( it == descriptions_.testCases_.end() ) + throw std::runtime_error( "Invalid test plan" ); + return it->second; } ! typedef std::deque<ConnectorPtr> Connectors; ! Connectors connectors_; ! OpenTest::TestPlans plans_; ! OpenTest::TestDescriptions descriptions_; }; }; #endif // OPENTEST_TEXTTESTDRIVER_H_INCLUDED + |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:49:27
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2315/include/cpput Added Files: opentestadaptor.h Log Message: * reorganized code a bit --- NEW FILE: opentestadaptor.h --- #ifndef CPPUT_OPENTESTADAPTOR_H_INCLUDED # define CPPUT_OPENTESTADAPTOR_H_INCLUDED # include <cpput/testcase.h> # include <opentest/connector.h> # include <opentest/interfaces.h> namespace CppUT { class OpenTestAdaptor : public OpenTest::TestRunnerInterface , private TestResultUpdater { public: OpenTestAdaptor() : currentTestPlanId_( 0 ) { } virtual ~OpenTestAdaptor() { } void addTest( const TestPtr &test ) { tests_.push_back( test ); } public: // overridden from TestRunnerInterface virtual void getTestDescriptions() { OpenTest::TestDescriptions descriptions; for ( Tests::const_iterator it = tests_.begin(); it != tests_.end(); ++it ) { addTestDescriptions( *it, descriptions ); } connector().testDriver().setTestDescriptions( descriptions ); } OpenTest::TestId allocateTestId( const TestPtr &test ) { OpenTest::TestId testId; IdsByTest::iterator it = idsByTest_.find( test ); if ( it == idsByTest_.end() ) { testId = OpenTest::TestId( idsByTest_.size() + 1 ); idsByTest_.insert( IdsByTest::value_type( test, testId ) ); testsById_.insert( TestsById::value_type( testId, test ) ); } else testId = it->second; return testId; } void setCommonTestDescription( const TestPtr &test, OpenTest::TestId testId, OpenTest::TestDescriptionCommon &description ) { description.name_ = test->name(); description.description_ = test->description(); // time-out // specifics } void addTestDescriptions( const TestPtr &test, OpenTest::TestDescriptions &descriptions ) { OpenTest::TestId testId = allocateTestId( test ); if ( test->isTestSuite() ) { OpenTest::TestSuiteDescription suiteDescription; setCommonTestDescription( test, testId, suiteDescription ); const AbstractTestSuite *suite = static_cast<AbstractTestSuite*>( test.get() ); for ( int index = 0; index < suite->testCount(); ++index ) { TestPtr childTest = suite->testAt(index); addTestDescriptions( childTest, descriptions ); suiteDescription.children_.push_back( allocateTestId( childTest ) ); } descriptions.testSuites_.insert( OpenTest::TestDescriptions::TestSuites::value_type( testId, suiteDescription ) ); } else { OpenTest::TestCaseDescription testCaseDescription; setCommonTestDescription( test, testId, testCaseDescription ); descriptions.testCases_.insert( OpenTest::TestDescriptions::TestCases::value_type( testId, testCaseDescription ) ); } } virtual void getTestPlans() { OpenTest::TestPlans plans; for ( TestsById::iterator it = testsById_.begin(); it != testsById_.end(); ++it ) { if ( it->second->isTestCase() ) { OpenTest::TestPlan plan; plan.testCase_ = it->first; plans.testPlans_.push_back( plan ); } } connector().testDriver().setDefaultTestPlans( plans ); } virtual void runTests( const OpenTest::TestPlans &plans ) { TestInfo::threadInstance().setTestResultUpdater( *this ); for ( OpenTest::TestPlans::Plans::const_iterator it = plans.testPlans_.begin(); it != plans.testPlans_.end(); ++it ) { const OpenTest::TestPlan &plan = *it; TestsById::const_iterator itTest = testsById_.find( plan.testCase_ ); if ( itTest != testsById_.end() ) { currentTestPlanId_ = OpenTest::TestPlanId( it - plans.testPlans_.begin() ); TestPtr test = itTest->second; if ( test->isTestCase() ) { AbstractTestCase &testCase = static_cast<AbstractTestCase &>(*test); connector().testDriver().startTesting( currentTestPlanId_ ); testCase.runTest(); publishTestResult(); } } } TestInfo::threadInstance().removeTestResultUpdater(); } void publishTestResult() { OpenTest::ResultStatus status; const TestStatus &actualStatus = TestInfo::threadInstance().testStatus(); switch ( actualStatus.status() ) { case TestStatus::passed: status.status_ = "passed"; break; case TestStatus::failed: status.status_ = "failed"; break; case TestStatus::skipped: status.status_ = "skipped"; break; default: CPPTL_DEBUG_ASSERT_UNREACHABLE; } status.statistics_["assertionCount"] = actualStatus.assertionCount(); status.statistics_["failedAssertionCount"] = actualStatus.failedAssertionCount(); status.statistics_["ignoredFailureCount"] = actualStatus.ignoredFailureCount(); connector().testDriver().setTestResult( currentTestPlanId_, status ); } virtual void stopTests() { } private: // overridden from TestResultUpdater virtual void addResultLog( const Json::Value &log ) { OpenTest::ResultLog result; result.log_ = log; connector().testDriver().addResultLog( currentTestPlanId_, result ); } virtual void addResultAssertion( const Assertion &assertion ) { OpenTest::ResultAssertion result; result.assertionType_ = (assertion.kind() == Assertion::fault) ? "fault" : "assertion"; result.assertionFormat_ = "generic"; result.message_ = assertion.messages().toString(); result.specific_ = assertion.testData(); result.isIgnoredFailure_ = assertion.isIgnoredFailure(); connector().testDriver().addResultAssertion( currentTestPlanId_, result ); } private: typedef std::map<OpenTest::TestId,TestPtr> TestsById; typedef std::map<TestPtr,OpenTest::TestId> IdsByTest; typedef std::deque<TestPtr> Tests; Tests tests_; OpenTest::TestPlanId currentTestPlanId_; TestsById testsById_; IdsByTest idsByTest_; }; } // namespace CppUT #endif // CPPUT_OPENTESTADAPTOR_H_INCLUDED |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:40:14
|
Update of /cvsroot/cppunit/cppunit2/include/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1169 Removed Files: testrunner.h Log Message: * removed dead code --- testrunner.h DELETED --- |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:19
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225 Modified Files: sconstruct Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** sconstruct 11 Nov 2005 20:54:14 -0000 1.22 --- sconstruct 11 Dec 2005 17:16:08 -0000 1.23 *************** *** 3,7 **** options = Options() ! options.Add( 'platform', 'platform used to build cppunit 2: suncc, vacpp, mingw, msvc6, msvc7, msvc71, linux-gcc', 'mingw' ) platform = ARGUMENTS.get( 'platform' ) --- 3,7 ---- options = Options() ! options.Add( 'platform', 'platform used to build cppunit 2: suncc, vacpp, mingw, msvc6, msvc7, msvc71, msvc80, linux-gcc', 'mingw' ) platform = ARGUMENTS.get( 'platform' ) *************** *** 134,136 **** --- 134,137 ---- buildProjectInDirectory( 'examples/log_demo' ) buildProjectInDirectory( 'examples/stringize_demo' ) + buildProjectInDirectory( 'examples/opentest_demo' ) #buildProjectInDirectory( 'src/qttestdriver' ) |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:18
|
Update of /cvsroot/cppunit/cppunit2/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/doc Modified Files: cpput.dox doxyfile Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: doxyfile =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/doxyfile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** doxyfile 13 Nov 2005 23:02:16 -0000 1.4 --- doxyfile 11 Dec 2005 17:16:08 -0000 1.5 *************** *** 37,41 **** EXTRACT_ALL = YES EXTRACT_PRIVATE = NO ! EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_METHODS = NO --- 37,41 ---- EXTRACT_ALL = YES EXTRACT_PRIVATE = NO ! EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_METHODS = NO *************** *** 51,55 **** SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO ! SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = NO --- 51,55 ---- SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO ! SORT_BY_SCOPE_NAME = YES GENERATE_TODOLIST = YES GENERATE_TESTLIST = NO *************** *** 111,121 **** GENERATE_HTMLHELP = NO CHM_FILE = cppunit2.chm ! HHC_LOCATION = ! GENERATE_CHI = NO ! BINARY_TOC = NO ! TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 ! GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 --- 111,121 ---- GENERATE_HTMLHELP = NO CHM_FILE = cppunit2.chm ! HHC_LOCATION = "c:\Program Files\HTML Help Workshop\hhc.exe" ! GENERATE_CHI = YES ! BINARY_TOC = YES ! TOC_EXPAND = YES DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 ! GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 *************** *** 200,204 **** COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES ! UML_LOOK = NO TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES --- 200,204 ---- COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES ! UML_LOOK = YES TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES Index: cpput.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cpput.dox 13 Nov 2005 23:02:16 -0000 1.3 --- cpput.dox 11 Dec 2005 17:16:08 -0000 1.4 *************** *** 6,9 **** --- 6,10 ---- This is a *very early* documenation release and is very incomplete (including this page). + <hr> \section section_toc Table of Contents *************** *** 19,26 **** --- 20,29 ---- + <hr> \section section_intro Introduction CppUnit 2 is a test framework for C++. + <hr> \section section_features Features - support aborting and non-aborting assertions *************** *** 33,36 **** --- 36,40 ---- - ... + <hr> \section section_writing_test Writing tests *************** *** 185,188 **** --- 189,193 ---- to abort the test. + <hr> \section section_projectlinks Project links - <a HREF="http://cppunit.sourceforge.net">cppunit home</a> *************** *** 191,194 **** --- 196,200 ---- + <hr> \section _rlinks Related links - <a HREF="http://www.json.org/">JSON</a> Specification and alternate language implementations. *************** *** 197,200 **** --- 203,207 ---- + <hr> \section section_license License The CppTL library is in public domain. |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:17
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/src/opentest Modified Files: interfaces.cpp remoteinterfaces.cpp Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: remoteinterfaces.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/remoteinterfaces.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** remoteinterfaces.cpp 6 Sep 2005 07:31:42 -0000 1.3 --- remoteinterfaces.cpp 11 Dec 2005 17:16:09 -0000 1.4 *************** *** 307,318 **** void ! TestDriverProxy::setDefaultTestPlan( const TestPlan &plan ) { sendMessage( makeSimpleRemoteMessage( driverMessageSetDefaultTestPlan, ! plan ) ); } void ! TestDriverProxy::startTesting( TestId testPlan ) { sendMessage( makeSimpleRemoteMessage( driverMessageStartTesting, --- 307,318 ---- void ! TestDriverProxy::setDefaultTestPlan( const TestPlans &plans ) { sendMessage( makeSimpleRemoteMessage( driverMessageSetDefaultTestPlan, ! plans ) ); } void ! TestDriverProxy::startTesting( TestPlanId testPlan ) { sendMessage( makeSimpleRemoteMessage( driverMessageStartTesting, *************** *** 322,326 **** void ! TestDriverProxy::addResultLog( TestId testPlan, const ResultLog &log ) { --- 322,326 ---- void ! TestDriverProxy::addResultLog( TestPlanId testPlan, const ResultLog &log ) { *************** *** 331,335 **** void ! TestDriverProxy::addResultAssertion( TestId testPlan, const ResultAssertion &assertion ) { --- 331,335 ---- void ! TestDriverProxy::addResultAssertion( TestPlanId testPlan, const ResultAssertion &assertion ) { *************** *** 340,344 **** void ! TestDriverProxy::setResultInputActualOutput( TestId testPlan, const ResultInputOutput &output ) { --- 340,344 ---- void ! TestDriverProxy::setResultInputActualOutput( TestPlanId testPlan, const ResultInputOutput &output ) { *************** *** 349,353 **** void ! TestDriverProxy::setTestResult( TestId testPlan, const ResultStatus &status ) { --- 349,353 ---- void ! TestDriverProxy::setTestResult( TestPlanId testPlan, const ResultStatus &status ) { *************** *** 380,384 **** break; case driverMessageSetDefaultTestPlan: ! dispatchSimpleRemoteCall( message, impl_, &TestDriverInterface::setDefaultTestPlan ); break; case driverMessageStartTesting: --- 380,384 ---- break; case driverMessageSetDefaultTestPlan: ! dispatchSimpleRemoteCall( message, impl_, &TestDriverInterface::setDefaultTestPlans ); break; case driverMessageStartTesting: Index: interfaces.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/interfaces.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** interfaces.cpp 14 Nov 2005 21:28:09 -0000 1.2 --- interfaces.cpp 11 Dec 2005 17:16:09 -0000 1.3 *************** *** 8,13 **** TestDescriptionCommon::serialize( Stream &stream ) const { ! return stream << id_ ! << name_ << description_ << descriptionSpecific_; --- 8,12 ---- TestDescriptionCommon::serialize( Stream &stream ) const { ! return stream << name_ << description_ << descriptionSpecific_; *************** *** 18,23 **** TestDescriptionCommon::unserialize( Stream &stream ) { ! return stream >> id_ ! >> name_ >> description_ >> descriptionSpecific_; --- 17,21 ---- TestDescriptionCommon::unserialize( Stream &stream ) { ! return stream >> name_ >> description_ >> descriptionSpecific_; *************** *** 65,70 **** TestDescriptions::serialize( Stream &stream ) const { ! serializeSTLSequence( stream, testCases_ ); ! return serializeSTLSequence( stream, testSuites_ ); } --- 63,68 ---- TestDescriptions::serialize( Stream &stream ) const { ! serializeSTLMap( stream, testCases_ ); ! return serializeSTLMap( stream, testSuites_ ); } *************** *** 72,77 **** TestDescriptions::unserialize( Stream &stream ) { ! unserializeSTLSequence( stream, testCases_ ); ! return unserializeSTLSequence( stream, testSuites_ ); } --- 70,76 ---- TestDescriptions::unserialize( Stream &stream ) { ! TestId key; ! unserializeSTLMap( stream, testCases_, key ); ! return unserializeSTLMap( stream, testSuites_, key ); } |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:17
|
Update of /cvsroot/cppunit/cppunit2/include/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/include/opentest Modified Files: forwards.h interfaces.h remoteinterfaces.h serializer.h Added Files: connector.h Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: forwards.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/forwards.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** forwards.h 7 Nov 2005 22:43:07 -0000 1.8 --- forwards.h 11 Dec 2005 17:16:08 -0000 1.9 *************** *** 5,8 **** --- 5,9 ---- # include <cpptl/forwards.h> # include <cpptl/enumerator.h> + # include <cpptl/intrusiveptr.h> # include <cpptl/sharedptr.h> # include <json/forwards.h> *************** *** 30,33 **** --- 31,39 ---- class TestDescriptions; class TestPlan; + class TestRunnerInterface; + class TestDriverInterface; + + class Connector; + typedef unsigned int TestId; *************** *** 39,42 **** --- 45,49 ---- typedef CppTL::SharedPtr<TestPlanEntry> TestPlanEntryPtr; typedef CppTL::AnyEnumerator<TestPlanEntryPtr> TestPlanEntryPtrEnum; + typedef CppTL::IntrusivePtr<Connector> ConnectorPtr; typedef unsigned int TestId; Index: serializer.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/serializer.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** serializer.h 9 Nov 2005 22:59:09 -0000 1.10 --- serializer.h 11 Dec 2005 17:16:08 -0000 1.11 *************** *** 275,278 **** --- 275,306 ---- } + template<class SequenceType> + Stream &serializeSTLMap( Stream &stream, const SequenceType &sequence ) + { + CPPTL_TYPENAME SequenceType::const_iterator it = sequence.begin(); + CPPTL_TYPENAME SequenceType::const_iterator itEnd = sequence.end(); + unsigned int size( sequence.size() ); + stream << size; + for ( ; it != itEnd; ++it ) + stream << it->first << it->second; + return stream; + } + + template<class SequenceType, class KeyType> + Stream &unserializeSTLMap( Stream &stream, SequenceType &sequence, KeyType &key ) + { + unsigned int size; + stream >> size; + CPPTL_TYPENAME SequenceType::iterator itWhere = sequence.begin(); + CPPTL_TYPENAME SequenceType::mapped_type value; + typedef CPPTL_TYPENAME SequenceType::value_type ValueType; + while ( size-- > 0 ) + { + stream >> key >> value; + itWhere = sequence.insert( itWhere, ValueType(key,value ) ); + } + return stream; + } + } // namespace OpenTest --- NEW FILE: connector.h --- #ifndef OPENTEST_CONNECTOR_H_INCLUDED # define OPENTEST_CONNECTOR_H_INCLUDED # include <opentest/forwards.h> # include <opentest/interfaces.h> # include <cpptl/thread.h> # include <set> namespace OpenTest { enum ConnectionStatus { connectionNotEstablished = 0, connectionEstablished, connectionInProcess }; class OPENTEST_API ConnectionStatusListener { public: virtual ~ConnectionStatusListener() { } virtual void connectionStatusChanged( ConnectionStatus oldStatus, ConnectionStatus newStatus, const std::string &info ) = 0; }; class OPENTEST_API Connector : public CppTL::IntrusiveCount { public: class Status { public: Status( ConnectionStatus status, const std::string &info ) : status_( status ) , info_( info ) { } ConnectionStatus status_; std::string info_; }; Connector() : status_( connectionNotEstablished ) , version_( 0 ) , driver_( 0 ) , runner_( 0 ) { } virtual ~Connector() { if ( driver_ ) driver_->setConnector( 0 ); if ( runner_ ) runner_->setConnector( 0 ); } void addListener( ConnectionStatusListener &listener ) { CppTL::Mutex::ScopedLockGuard guard( lock_ ); listeners_.insert( &listener ); ++version_; } void removeListener( ConnectionStatusListener &listener ) { CppTL::Mutex::ScopedLockGuard guard( lock_ ); listeners_.erase( &listener ); ++version_; } Json::Value properties() const { CppTL::Mutex::ScopedLockGuard guard( lock_ ); return properties_; } //void setProperties( const Json::Value &properties ) //{ // properties_ = properties; //} Status status() const { CppTL::Mutex::ScopedLockGuard guard( lock_ ); return Status( status_, statusInfo_.str() ); } void updateStatus( ConnectionStatus status, const std::string &info = std::string() ) { ConnectionStatus oldStatus; Listeners listenersToNotify; VersionId version; { CppTL::Mutex::ScopedLockGuard guard( lock_ ); if ( status_ == status && statusInfo_ == info ) return; listenersToNotify = listeners_; oldStatus = status_; status_ = status; statusInfo_ = info; listenersToNotify = listeners_; version = version_; } Listeners notifiedListeners; while ( !listenersToNotify.empty() ) { ConnectionStatusListener &listener = **(listenersToNotify.begin()); listener.connectionStatusChanged( oldStatus, status, info ); listenersToNotify.erase( &listener ); if ( !listenersToNotify.empty() ) { notifiedListeners.insert( &listener ); CppTL::Mutex::ScopedLockGuard guard( lock_ ); if ( version != version_ ) // listener list changed { listenersToNotify = listeners_; listenersToNotify.erase( notifiedListeners.begin(), notifiedListeners.end() ); version = version_; } } } } void attachTestDriver( TestDriverInterface &driver ) { driver_ = &driver; driver_->setConnector( this ); } void attachTestRunner( TestRunnerInterface &runner ) { runner_ = &runner; runner_->setConnector( this ); } TestDriverInterface &testDriver() { return *driver_; } TestRunnerInterface &testRunner() { return *runner_; } virtual void establishConnection() = 0; virtual void disconnect() = 0; private: typedef std::set<ConnectionStatusListener *> Listeners; Listeners listeners_; mutable CppTL::Mutex lock_; Json::Value properties_; CppTL::ConstString statusInfo_; ConnectionStatus status_; TestRunnerInterface *runner_; TestDriverInterface *driver_; typedef volatile unsigned int VersionId; VersionId version_; }; class OPENTEST_API DirectConnector : public Connector { public: DirectConnector( TestRunnerInterface &runner, TestDriverInterface &driver ) { attachTestRunner( runner ); attachTestDriver( driver ); } public: // overridden from Connector virtual void establishConnection() { updateStatus( connectionEstablished, "direct connection" ); } virtual void disconnect() { updateStatus( connectionNotEstablished, "disconnected" ); } }; } // namespace OpenTest #endif // OPENTEST_CONNECTOR_H_INCLUDED Index: interfaces.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/interfaces.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** interfaces.h 14 Nov 2005 21:28:08 -0000 1.6 --- interfaces.h 11 Dec 2005 17:16:08 -0000 1.7 *************** *** 12,17 **** namespace OpenTest { ! class OPENTEST_API TestRunnerInterface { public: --- 12,43 ---- namespace OpenTest { + class OPENTEST_API Connectable + { + public: + Connectable() + : connector_( 0 ) + { + } ! virtual ~Connectable() ! { ! } ! ! void setConnector( Connector *connector ) ! { ! connector_ = connector; ! } ! ! Connector &connector() ! { ! return *connector_; ! } ! ! private: ! Connector *connector_; ! }; ! ! ! class OPENTEST_API TestRunnerInterface : public Connectable { public: *************** *** 28,32 **** ! class OPENTEST_API TestDriverInterface { public: --- 54,58 ---- ! class OPENTEST_API TestDriverInterface : public Connectable { public: *************** *** 35,52 **** virtual void setTestDescriptions( const TestDescriptions &tests ) = 0; ! virtual void setDefaultTestPlan( const TestPlan &plan ) = 0; ! virtual void startTesting( TestId testPlan ) = 0; ! virtual void addResultLog( TestId testPlan, const ResultLog &log ) = 0; ! virtual void addResultAssertion( TestId testPlan, const ResultAssertion &assertion ) = 0; ! virtual void setResultInputActualOutput( TestId testPlan, const ResultInputOutput &output ) = 0; ! virtual void setTestResult( TestId testPlan, const ResultStatus &status ) = 0; --- 61,78 ---- virtual void setTestDescriptions( const TestDescriptions &tests ) = 0; ! virtual void setDefaultTestPlans( const TestPlans &plans ) = 0; ! virtual void startTesting( TestPlanId testPlan ) = 0; ! virtual void addResultLog( TestPlanId testPlan, const ResultLog &log ) = 0; ! virtual void addResultAssertion( TestPlanId testPlan, const ResultAssertion &assertion ) = 0; ! virtual void setResultInputActualOutput( TestPlanId testPlan, const ResultInputOutput &output ) = 0; ! virtual void setTestResult( TestPlanId testPlan, const ResultStatus &status ) = 0; *************** *** 58,62 **** { public: - TestId id_; String name_; String description_; --- 84,87 ---- *************** *** 94,99 **** { public: ! std::deque<TestCaseDescription> testCases_; ! std::deque<TestSuiteDescription> testSuites_; Stream &serialize( Stream &stream ) const; --- 119,126 ---- { public: ! typedef std::map<TestId,TestCaseDescription> TestCases; ! typedef std::map<TestId,TestSuiteDescription> TestSuites; ! TestCases testCases_; ! TestSuites testSuites_; Stream &serialize( Stream &stream ) const; *************** *** 117,121 **** { public: ! std::deque<TestPlan> testPlans_; Stream &serialize( Stream &stream ) const; --- 144,149 ---- { public: ! typedef std::deque<TestPlan> Plans; ! Plans testPlans_; Stream &serialize( Stream &stream ) const; Index: remoteinterfaces.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/remoteinterfaces.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** remoteinterfaces.h 6 Sep 2005 07:31:42 -0000 1.4 --- remoteinterfaces.h 11 Dec 2005 17:16:08 -0000 1.5 *************** *** 82,102 **** void setTestDescriptions( const TestDescriptions &tests ); ! void setDefaultTestPlan( const TestPlan &plan ); ! void startTesting( TestId testPlan ); ! void addResultLog( TestId testPlan, const ResultLog &log ); ! void addResultAssertion( TestId testPlan, const ResultAssertion &assertion ); ! void setResultInputActualOutput( TestId testPlan, const ResultInputOutput &output ); ! void setTestResult( TestId testPlan, const ResultStatus &status ); ! void testPlanDone( TestId id ); }; --- 82,102 ---- void setTestDescriptions( const TestDescriptions &tests ); ! void setDefaultTestPlan( const TestPlans &plans ); ! void startTesting( TestPlanId testPlan ); ! void addResultLog( TestPlanId testPlan, const ResultLog &log ); ! void addResultAssertion( TestPlanId testPlan, const ResultAssertion &assertion ); ! void setResultInputActualOutput( TestPlanId testPlan, const ResultInputOutput &output ); ! void setTestResult( TestPlanId testPlan, const ResultStatus &status ); ! void testPlanDone( TestPlanId id ); }; |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:17
|
Update of /cvsroot/cppunit/cppunit2/makefiles/vs71 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/makefiles/vs71 Modified Files: cppunit2.sln opentest_lib.vcproj Added Files: .cvsignore examples_opentest_demo.vcproj Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. --- NEW FILE: .cvsignore --- *.WW *.ncb *.suo Index: opentest_lib.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/opentest_lib.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** opentest_lib.vcproj 8 Nov 2005 21:45:22 -0000 1.3 --- opentest_lib.vcproj 11 Dec 2005 17:16:08 -0000 1.4 *************** *** 112,115 **** --- 112,118 ---- </File> <File + RelativePath="..\..\include\opentest\connector.h"> + </File> + <File RelativePath="..\..\include\opentest\forwards.h"> </File> Index: cppunit2.sln =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/cppunit2.sln,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cppunit2.sln 7 Nov 2005 22:43:07 -0000 1.2 --- cppunit2.sln 11 Dec 2005 17:16:08 -0000 1.3 *************** *** 25,28 **** --- 25,37 ---- EndProjectSection EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_opentest_demo", "examples_opentest_demo.vcproj", "{544D6860-E43B-4677-81B6-1FD70687B99D}" + ProjectSection(ProjectDependencies) = postProject + {79273A0D-700E-4AFA-B7F2-14D4CC325521} = {79273A0D-700E-4AFA-B7F2-14D4CC325521} + {2506991E-13CA-49C9-8686-AACDE35C21B6} = {2506991E-13CA-49C9-8686-AACDE35C21B6} + {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D} = {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D} + {FA200A48-CBCD-4A3D-8CA4-5F083610B696} = {FA200A48-CBCD-4A3D-8CA4-5F083610B696} + {4037D758-74CD-412B-B67C-BA3CA89FEF28} = {4037D758-74CD-412B-B67C-BA3CA89FEF28} + EndProjectSection + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 62,65 **** --- 71,80 ---- {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Release.ActiveCfg = Release|Win32 {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Release.Build.0 = Release|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.Debug.ActiveCfg = Debug|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.Debug.Build.0 = Debug|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.dummy.ActiveCfg = Debug|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.dummy.Build.0 = Debug|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.Release.ActiveCfg = Release|Win32 + {544D6860-E43B-4677-81B6-1FD70687B99D}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution --- NEW FILE: examples_opentest_demo.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="examples_opentest_demo" ProjectGUID="{544D6860-E43B-4677-81B6-1FD70687B99D}" Keyword="Win32Proj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/examples_opentest_demo/debug" IntermediateDirectory="../../build/examples_opentest_demo/debug" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include;../.." PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4" DisableSpecificWarnings="4355"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/examples_opentest_demo.exe" LinkIncremental="2" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/examples_opentest_demo.pdb" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/examples_opentest_demo/release" IntermediateDirectory="../../build/examples_opentest_demo/release" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include;../.." PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" DisableSpecificWarnings="4355"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/examples_opentest_demo.exe" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath="..\..\examples\opentest_demo\main.cpp"> </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:17
|
Update of /cvsroot/cppunit/cppunit2/src/opentesttest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/src/opentesttest Modified Files: remoteinterfacestest.cpp Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: remoteinterfacestest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentesttest/remoteinterfacestest.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** remoteinterfacestest.cpp 8 Nov 2005 23:25:31 -0000 1.3 --- remoteinterfacestest.cpp 11 Dec 2005 17:16:09 -0000 1.4 *************** *** 113,117 **** OpenTest::TestPlans plans2; OpenTest::TestPlan plan1; - plan1.id_ = OpenTest::TestId( 5678 ); plan1.testCase_ = OpenTest::TestId( 1234 ); plan1.name_ = "dummy test"; --- 113,116 ---- |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:17
|
Update of /cvsroot/cppunit/cppunit2/examples/opentest_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/examples/opentest_demo Added Files: SConscript main.cpp Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/testcase.h> #include <opentest/connector.h> #include <opentest/interfaces.h> #include <stdio.h> namespace CppUT { class CppUTTestRuner : public OpenTest::TestRunnerInterface , private TestResultUpdater { public: CppUTTestRuner() : currentTestPlanId_( 0 ) { } void addTest( const TestPtr &test ) { tests_.push_back( test ); } public: // overridden from TestRunnerInterface virtual ~CppUTTestRuner() { } virtual void getTestDescriptions() { OpenTest::TestDescriptions descriptions; for ( Tests::const_iterator it = tests_.begin(); it != tests_.end(); ++it ) { addTestDescriptions( *it, descriptions ); } connector().testDriver().setTestDescriptions( descriptions ); } OpenTest::TestId allocateTestId( const TestPtr &test ) { OpenTest::TestId testId; IdsByTest::iterator it = idsByTest_.find( test ); if ( it == idsByTest_.end() ) { testId = OpenTest::TestId( idsByTest_.size() + 1 ); idsByTest_.insert( IdsByTest::value_type( test, testId ) ); testsById_.insert( TestsById::value_type( testId, test ) ); } else testId = it->second; return testId; } void setCommonTestDescription( const TestPtr &test, OpenTest::TestId testId, OpenTest::TestDescriptionCommon &description ) { description.name_ = test->name(); description.description_ = test->description(); // time-out // specifics } void addTestDescriptions( const TestPtr &test, OpenTest::TestDescriptions &descriptions ) { OpenTest::TestId testId = allocateTestId( test ); if ( test->isTestSuite() ) { OpenTest::TestSuiteDescription suiteDescription; setCommonTestDescription( test, testId, suiteDescription ); const AbstractTestSuite *suite = static_cast<AbstractTestSuite*>( test.get() ); for ( int index = 0; index < suite->testCount(); ++index ) { TestPtr childTest = suite->testAt(index); addTestDescriptions( childTest, descriptions ); suiteDescription.children_.push_back( allocateTestId( childTest ) ); } descriptions.testSuites_.insert( OpenTest::TestDescriptions::TestSuites::value_type( testId, suiteDescription ) ); } else { OpenTest::TestCaseDescription testCaseDescription; setCommonTestDescription( test, testId, testCaseDescription ); descriptions.testCases_.insert( OpenTest::TestDescriptions::TestCases::value_type( testId, testCaseDescription ) ); } } virtual void getTestPlans() { OpenTest::TestPlans plans; for ( TestsById::iterator it = testsById_.begin(); it != testsById_.end(); ++it ) { if ( it->second->isTestCase() ) { OpenTest::TestPlan plan; plan.testCase_ = it->first; plans.testPlans_.push_back( plan ); } } connector().testDriver().setDefaultTestPlans( plans ); } virtual void runTests( const OpenTest::TestPlans &plans ) { TestInfo::threadInstance().setTestResultUpdater( *this ); for ( OpenTest::TestPlans::Plans::const_iterator it = plans.testPlans_.begin(); it != plans.testPlans_.end(); ++it ) { const OpenTest::TestPlan &plan = *it; TestsById::const_iterator itTest = testsById_.find( plan.testCase_ ); if ( itTest != testsById_.end() ) { currentTestPlanId_ = OpenTest::TestPlanId( it - plans.testPlans_.begin() ); TestPtr test = itTest->second; if ( test->isTestCase() ) { AbstractTestCase &testCase = static_cast<AbstractTestCase &>(*test); connector().testDriver().startTesting( currentTestPlanId_ ); testCase.runTest(); publishTestResult(); } } } TestInfo::threadInstance().removeTestResultUpdater(); } void publishTestResult() { OpenTest::ResultStatus status; const TestStatus &actualStatus = TestInfo::threadInstance().testStatus(); switch ( actualStatus.status() ) { case TestStatus::passed: status.status_ = "passed"; break; case TestStatus::failed: status.status_ = "failed"; break; case TestStatus::skipped: status.status_ = "skipped"; break; default: CPPTL_DEBUG_ASSERT_UNREACHABLE; } status.statistics_["assertionCount"] = actualStatus.assertionCount(); status.statistics_["failedAssertionCount"] = actualStatus.failedAssertionCount(); status.statistics_["ignoredFailureCount"] = actualStatus.ignoredFailureCount(); connector().testDriver().setTestResult( currentTestPlanId_, status ); } virtual void stopTests() { } private: // overridden from TestResultUpdater virtual void addResultLog( const Json::Value &log ) { OpenTest::ResultLog result; result.log_ = log; connector().testDriver().addResultLog( currentTestPlanId_, result ); } virtual void addResultAssertion( const Assertion &assertion ) { OpenTest::ResultAssertion result; result.assertionType_ = (assertion.kind() == Assertion::fault) ? "fault" : "assertion"; result.assertionFormat_ = "generic"; result.message_ = assertion.messages().toString(); result.specific_ = assertion.testData(); result.isIgnoredFailure_ = assertion.isIgnoredFailure(); connector().testDriver().addResultAssertion( currentTestPlanId_, result ); } private: typedef std::map<OpenTest::TestId,TestPtr> TestsById; typedef std::map<TestPtr,OpenTest::TestId> IdsByTest; typedef std::deque<TestPtr> Tests; Tests tests_; OpenTest::TestPlanId currentTestPlanId_; TestsById testsById_; IdsByTest idsByTest_; }; } // namespace CppUT namespace OpenTest { typedef CppTL::IntrusivePtr<OpenTest::TestRunnerInterface> TestRunnerInterfacePtr; class TestDriver : private TestDriverInterface { public: TestDriver( int argc, const char *argv[] ) { } virtual ~TestDriver() { } void addTestRunner( TestRunnerInterface &testRunner ) { addConnector( new DirectConnector( testRunner, *this ) ); } void addConnector( const ConnectorPtr &connector ) { connectors_.push_back( connector ); } void runTests() { for ( Connectors::iterator it = connectors_.begin(); it != connectors_.end(); ++it ) { Connector &connector = **it; if ( connector.status().status_ != connectionEstablished ) connector.establishConnection(); } for ( Connectors::iterator it = connectors_.begin(); it != connectors_.end(); ++it ) { Connector &connector = **it; if ( connector.status().status_ == connectionEstablished ) { connector.testRunner().getTestDescriptions(); connector.testRunner().getTestPlans(); connector.testRunner().runTests(plans_); } } } private: // overridden from TestDriverInterface virtual void setTestDescriptions( const TestDescriptions &tests ) { descriptions_ = tests; } virtual void setDefaultTestPlans( const TestPlans &plans ) { plans_ = plans; } virtual void startTesting( TestPlanId testPlan ) { printf( "Start testing: %s\n", getTestCaseDesc( testPlan ).name_.c_str() ); } virtual void addResultLog( TestPlanId testPlan, const ResultLog &log ) { printf( "Log for %s:\n", getTestCaseDesc( testPlan ).name_.c_str() ); } virtual void addResultAssertion( TestPlanId testPlan, const ResultAssertion &assertion ) { printf( "- Assertion for %s:\n" "Type:%s\n" "Message:\n%s\n", getTestCaseDesc( testPlan ).name_.c_str(), assertion.assertionType_.c_str(), assertion.message_.c_str() ); } virtual void setResultInputActualOutput( TestPlanId testPlan, const ResultInputOutput &output ) { } virtual void setTestResult( TestPlanId testPlan, const ResultStatus &status ) { printf( "Result for %s:\n%s\n", getTestCaseDesc( testPlan ).name_.c_str(), status.status_.c_str() ); } virtual void testPlanDone( TestPlanId id ) { } private: OpenTest::TestCaseDescription &getTestCaseDesc( TestPlanId testPlan ) { TestId testId = plans_.testPlans_.at( testPlan ).testCase_; TestDescriptions::TestCases::iterator it = descriptions_.testCases_.find( testId ); if ( it == descriptions_.testCases_.end() ) throw std::runtime_error( "Invalid test plan" ); return it->second; } typedef std::deque<ConnectorPtr> Connectors; Connectors connectors_; OpenTest::TestPlans plans_; OpenTest::TestDescriptions descriptions_; }; }; // Checking assertion do not abort the test uppon failure: // all the failing assertions below will be reported by the test framework static void testBasicCheckingAssertion() { CPPUT_CHECK( 1 == 2, "1 is not equal to 2..." ); CPPUT_CHECK_EXPR( 1 + 2 == 4 ); CPPUT_CHECK_FALSE( 1 == 1, "1 is equal to 1..." ); CPPUT_CHECK_EXPR_FALSE( 1 + 1 == 2 ); CPPUT_CHECK_EQUAL( 1, 2 ); CPPUT_CHECK_NOT_EQUAL( 34, 34 ); } int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ), "testBasicCheckingAssertion" ) ); CppUT::CppUTTestRuner runner; runner.addTest( allSuite.get() ); OpenTest::TestDriver driver( argc, argv ); driver.addTestRunner( runner ); return driver.runTests(); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'opentest_demo' ) |
From: Baptiste L. <bl...@us...> - 2005-12-11 17:16:16
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/src/cpput Modified Files: testrunner.cpp Log Message: * rough sketch of a working OpenTest driver with CppUT adaptor for TestRunner. Index: testrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testrunner.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testrunner.cpp 4 Jul 2005 08:11:26 -0000 1.11 --- testrunner.cpp 11 Dec 2005 17:16:09 -0000 1.12 *************** *** 138,142 **** DeclaredTests::const_iterator itTest = tests_.find( id ); tracker.startTest( entry ); - TestInfo::startNewTest(); TestInfo::mergeInResult( configuration ); TestInfo::mergeInResult( entry.configuration() ); --- 138,141 ---- |