mockpp-commits Mailing List for Mock Objects for C++ (Page 18)
Brought to you by:
ewald-arnold
You can subscribe to this list here.
2005 |
Jan
|
Feb
(17) |
Mar
(178) |
Apr
(119) |
May
(60) |
Jun
(3) |
Jul
(60) |
Aug
(16) |
Sep
(55) |
Oct
(156) |
Nov
(136) |
Dec
(255) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(98) |
Feb
(8) |
Mar
(57) |
Apr
(43) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ewald A. <ewa...@us...> - 2005-12-08 17:24:22
|
Update of /cvsroot/mockpp/mockpp/msvc2005/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3030/msvc2005/mockpp Added Files: .cvsignore Makefile.am mockpp.sln mockpp.vcproj mockpp_production.vcproj Log Message: new project files (converted from msvc71) --- NEW FILE: .cvsignore --- Makefile Makefile.in *.~* *.ncb *.suo *.user --- NEW FILE: Makefile.am --- SUBDIRS = examples tests EXTRA_DIST = mockpp.vcproj mockpp_production.vcproj mockpp.sln CLEAN_FILES = *.plg *.opt *.ncb *.dep *.~* *.~~* *~ --- NEW FILE: mockpp.sln --- Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basicmock", "examples\tutorial\basicmock.vcproj", "{67066CA0-B2AD-456C-8663-A1D93B0E7949}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chainmock", "examples\tutorial\chainmock.vcproj", "{9C4E72A0-6393-429A-AFDB-64AE0FBB17C8}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cppunit", "examples\tutorial\cppunit.vcproj", "{4AEB7B36-6044-4B23-9754-22F7A28F785B}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "examples\examples.vcproj", "{15A26E8F-FE6D-4EA6-9B41-26306D17F76A}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mock_test", "tests\mock_test.vcproj", "{F22BA7AF-9CFC-4F2A-947D-69AF7C466635}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} {6AB18DF8-7204-4B80-AE27-0CDB36E321B4} = {6AB18DF8-7204-4B80-AE27-0CDB36E321B4} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mockpp", "mockpp.vcproj", "{4B2B3833-C35A-4F2F-BFAF-B686D3827531}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "poormock", "examples\tutorial\poormock.vcproj", "{6CD5CF99-3185-4FD1-B172-DE5947721854}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visitmock", "examples\tutorial\visitmock.vcproj", "{ADC8008C-7D8F-44BC-9498-E1097B4DCCA1}" ProjectSection(ProjectDependencies) = postProject {4B2B3833-C35A-4F2F-BFAF-B686D3827531} = {4B2B3833-C35A-4F2F-BFAF-B686D3827531} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "poormock_se", "examples\tutorial\poormock_se.vcproj", "{BD779AA5-9F07-466E-AC76-7C27BD3D4E86}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mockpp_production", "mockpp_production.vcproj", "{6AB18DF8-7204-4B80-AE27-0CDB36E321B4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {67066CA0-B2AD-456C-8663-A1D93B0E7949}.Debug|Win32.ActiveCfg = Debug|Win32 {67066CA0-B2AD-456C-8663-A1D93B0E7949}.Debug|Win32.Build.0 = Debug|Win32 {67066CA0-B2AD-456C-8663-A1D93B0E7949}.Release|Win32.ActiveCfg = Release|Win32 {67066CA0-B2AD-456C-8663-A1D93B0E7949}.Release|Win32.Build.0 = Release|Win32 {9C4E72A0-6393-429A-AFDB-64AE0FBB17C8}.Debug|Win32.ActiveCfg = Debug|Win32 {9C4E72A0-6393-429A-AFDB-64AE0FBB17C8}.Debug|Win32.Build.0 = Debug|Win32 {9C4E72A0-6393-429A-AFDB-64AE0FBB17C8}.Release|Win32.ActiveCfg = Release|Win32 {9C4E72A0-6393-429A-AFDB-64AE0FBB17C8}.Release|Win32.Build.0 = Release|Win32 {4AEB7B36-6044-4B23-9754-22F7A28F785B}.Debug|Win32.ActiveCfg = Debug|Win32 {4AEB7B36-6044-4B23-9754-22F7A28F785B}.Debug|Win32.Build.0 = Debug|Win32 {4AEB7B36-6044-4B23-9754-22F7A28F785B}.Release|Win32.ActiveCfg = Release|Win32 {4AEB7B36-6044-4B23-9754-22F7A28F785B}.Release|Win32.Build.0 = Release|Win32 {15A26E8F-FE6D-4EA6-9B41-26306D17F76A}.Debug|Win32.ActiveCfg = Debug|Win32 {15A26E8F-FE6D-4EA6-9B41-26306D17F76A}.Debug|Win32.Build.0 = Debug|Win32 {15A26E8F-FE6D-4EA6-9B41-26306D17F76A}.Release|Win32.ActiveCfg = Release|Win32 {15A26E8F-FE6D-4EA6-9B41-26306D17F76A}.Release|Win32.Build.0 = Release|Win32 {F22BA7AF-9CFC-4F2A-947D-69AF7C466635}.Debug|Win32.ActiveCfg = Debug|Win32 {F22BA7AF-9CFC-4F2A-947D-69AF7C466635}.Debug|Win32.Build.0 = Debug|Win32 {F22BA7AF-9CFC-4F2A-947D-69AF7C466635}.Release|Win32.ActiveCfg = Release|Win32 {F22BA7AF-9CFC-4F2A-947D-69AF7C466635}.Release|Win32.Build.0 = Release|Win32 {4B2B3833-C35A-4F2F-BFAF-B686D3827531}.Debug|Win32.ActiveCfg = Debug|Win32 {4B2B3833-C35A-4F2F-BFAF-B686D3827531}.Debug|Win32.Build.0 = Debug|Win32 {4B2B3833-C35A-4F2F-BFAF-B686D3827531}.Release|Win32.ActiveCfg = Release|Win32 {4B2B3833-C35A-4F2F-BFAF-B686D3827531}.Release|Win32.Build.0 = Release|Win32 {6CD5CF99-3185-4FD1-B172-DE5947721854}.Debug|Win32.ActiveCfg = Debug|Win32 {6CD5CF99-3185-4FD1-B172-DE5947721854}.Debug|Win32.Build.0 = Debug|Win32 {6CD5CF99-3185-4FD1-B172-DE5947721854}.Release|Win32.ActiveCfg = Release|Win32 {6CD5CF99-3185-4FD1-B172-DE5947721854}.Release|Win32.Build.0 = Release|Win32 {ADC8008C-7D8F-44BC-9498-E1097B4DCCA1}.Debug|Win32.ActiveCfg = Debug|Win32 {ADC8008C-7D8F-44BC-9498-E1097B4DCCA1}.Debug|Win32.Build.0 = Debug|Win32 {ADC8008C-7D8F-44BC-9498-E1097B4DCCA1}.Release|Win32.ActiveCfg = Release|Win32 {ADC8008C-7D8F-44BC-9498-E1097B4DCCA1}.Release|Win32.Build.0 = Release|Win32 {BD779AA5-9F07-466E-AC76-7C27BD3D4E86}.Debug|Win32.ActiveCfg = Debug|Win32 {BD779AA5-9F07-466E-AC76-7C27BD3D4E86}.Debug|Win32.Build.0 = Debug|Win32 {BD779AA5-9F07-466E-AC76-7C27BD3D4E86}.Release|Win32.ActiveCfg = Release|Win32 {BD779AA5-9F07-466E-AC76-7C27BD3D4E86}.Release|Win32.Build.0 = Release|Win32 {6AB18DF8-7204-4B80-AE27-0CDB36E321B4}.Debug|Win32.ActiveCfg = Debug|Win32 {6AB18DF8-7204-4B80-AE27-0CDB36E321B4}.Debug|Win32.Build.0 = Debug|Win32 {6AB18DF8-7204-4B80-AE27-0CDB36E321B4}.Release|Win32.ActiveCfg = Release|Win32 {6AB18DF8-7204-4B80-AE27-0CDB36E321B4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal --- NEW FILE: mockpp.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="mockpp" ProjectGUID="{4B2B3833-C35A-4F2F-BFAF-B686D3827531}" RootNamespace="mockpp" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(TEMP)\compile\mockpp\Debug" [...976 lines suppressed...] > </File> <File RelativePath="..\..\mockpp\constraint\StringEndsWith.h" > </File> <File RelativePath="..\..\mockpp\constraint\StringStartsWith.h" > </File> <File RelativePath="..\..\mockpp\constraint\TypelessConstraint.h" > </File> </Filter> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: mockpp_production.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="mockpp_production" ProjectGUID="{6AB18DF8-7204-4B80-AE27-0CDB36E321B4}" Keyword="MFCDLLProj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(TEMP)\compile\mockpp\production\Debug" IntermediateDirectory="$(TEMP)\compile\mockpp\production\Debug" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="false" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../.." PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1031" AdditionalIncludeDirectories="$(IntDir)" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="C:\tmp\compile\mockpp\production\Release" IntermediateDirectory="C:\tmp\compile\mockpp\production\Release" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="false" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../.." PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL" RuntimeLibrary="2" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1031" AdditionalIncludeDirectories="$(IntDir)" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File RelativePath="..\..\mockpp\production\TimeServer.cpp" > </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File RelativePath="..\..\mockpp\production\mockpp_production.h" > </File> <File RelativePath="..\..\mockpp\production\TimeServer.h" > </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:24:22
|
Update of /cvsroot/mockpp/mockpp/msvc2005/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3030/msvc2005/lib Added Files: .cvsignore Makefile.am Log Message: new project files (converted from msvc71) --- NEW FILE: .cvsignore --- Makefile Makefile.in *.~* --- NEW FILE: Makefile.am --- CLEANFILES = *.~* *.~~* *~ |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:21:56
|
Update of /cvsroot/mockpp/mockpp/msvc2005/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2265/msvc2005/mockpp/tests Log Message: Directory /cvsroot/mockpp/mockpp/msvc2005/mockpp/tests added to the repository |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:20:06
|
Update of /cvsroot/mockpp/mockpp/msvc2005/mockpp/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1358/msvc2005/mockpp/examples Log Message: Directory /cvsroot/mockpp/mockpp/msvc2005/mockpp/examples added to the repository |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:17:50
|
Update of /cvsroot/mockpp/mockpp/msvc2005/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv615/msvc2005/mockpp Log Message: Directory /cvsroot/mockpp/mockpp/msvc2005/mockpp added to the repository |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:17:26
|
Update of /cvsroot/mockpp/mockpp/msvc2005/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv555/msvc2005/lib Log Message: Directory /cvsroot/mockpp/mockpp/msvc2005/lib added to the repository |
From: Ewald A. <ewa...@us...> - 2005-12-08 17:16:22
|
Update of /cvsroot/mockpp/mockpp/msvc2005 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv317/msvc2005 Log Message: Directory /cvsroot/mockpp/mockpp/msvc2005 added to the repository |
From: Ewald A. <ewa...@us...> - 2005-12-07 19:51:24
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23767/bcb5 Modified Files: mock_test.bpf Log Message: new test file Index: mock_test.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mock_test.bpf,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- mock_test.bpf 1 Nov 2005 08:43:27 -0000 1.39 +++ mock_test.bpf 7 Dec 2005 19:51:15 -0000 1.40 @@ -47,5 +47,6 @@ USEUNIT("..\mockpp\tests\VisitableMockMethod_1_test.cpp"); USEUNIT("..\mockpp\tests\VisitableMockMethod_2_test.cpp"); USEUNIT("..\mockpp\tests\ResponseVector_test.cpp"); +USEUNIT("..\mockpp\tests\NoException_test.cpp"); //--------------------------------------------------------------------------- |
From: Ewald A. <ewa...@us...> - 2005-12-07 19:50:05
|
Update of /cvsroot/mockpp/mockpp/3party/ministl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23439/3party/ministl Modified Files: Makefile.am Log Message: separate headers Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 1 Dec 2005 18:15:08 -0000 1.3 +++ Makefile.am 7 Dec 2005 19:49:56 -0000 1.4 @@ -3,7 +3,9 @@ CLEANFILES = *.~* *.~~* *~ EXTRA_DIST =\ - !README \ + !README + +pkginclude_HEADERS = \ algo.h \ algorithm \ basic_string.h \ |
From: Ewald A. <ewa...@us...> - 2005-12-07 19:49:09
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23273/mockpp/docs/en Modified Files: dev_embedded.docbook Log Message: two sections Index: dev_embedded.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_embedded.docbook,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- dev_embedded.docbook 3 Dec 2005 18:13:14 -0000 1.4 +++ dev_embedded.docbook 7 Dec 2005 19:49:00 -0000 1.5 @@ -1,10 +1,13 @@ <sect1 id="embedded-systems"> <title>Working With Embedded Systems</title> +<sect2 id="embedded-problem"> +<title>The Problem</title> + <para>There are hidden costs concerning memory resources when programming in C++. On a desktop system with plenty of virtual memory you don't neccessarily recognize it. But working with embedded systems is different as there is only a -limited amout of physical ram available.</para> +limited amout of physical memory available.</para> <para>For that reasons it is important to know the places where he compiler adds additional code: @@ -39,7 +42,7 @@ compiled with different settings. The size ranged from around 320KiB with the default settings down to 180KiB with as many features disabled as possible. -<table><title>Proportion of Important Features</title> +<table><title>Memory Consumption of C++ Code</title> <tgroup cols='3' align='left' colsep='1' rowsep='1'> <thead> <row> @@ -69,7 +72,12 @@ </para> -<para>Disabling RTTI in mockpp; has little consequences. It is only used for a +</sect2> + +<sect2 id="embedded-solution"> +<title>The Solution</title> + +<para>Disabling RTTI in &mockpp; has little consequences. It is only used for a few diagnostic messages. In the worst case you might have to search for the problematic class.</para> @@ -112,4 +120,5 @@ </para> +</sect2> </sect1> |
From: Ewald A. <ewa...@us...> - 2005-12-07 19:48:22
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23127/mockpp/tests Added Files: NoException_test.cpp Log Message: new test file --- NEW FILE: NoException_test.cpp --- /*************************************************************************** NoException_test.cpp - unit tests for tests with disabled exceptions ------------------- begin : Wed Dec 7 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: NoException_test.cpp,v 1.1 2005/12/07 19:48:12 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** * * This program is free software; you can redistribute it Or/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ***************************************************************************/ #include <mockpp/mockpp.h> // always first #ifndef HAVE_CPPUNIT # warning CppUnit not available at compile time #else #include <cppunit/extensions/HelperMacros.h> class NoException_test : public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE( NoException_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); public: void test_invoke(); }; CPPUNIT_TEST_SUITE_REGISTRATION(NoException_test); void NoException_test::test_invoke() { } #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-12-03 18:13:22
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29487/mockpp/docs/en Modified Files: dev_embedded.docbook Log Message: extend Index: dev_embedded.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_embedded.docbook,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- dev_embedded.docbook 3 Dec 2005 15:56:33 -0000 1.3 +++ dev_embedded.docbook 3 Dec 2005 18:13:14 -0000 1.4 @@ -69,7 +69,33 @@ </para> -<para> +<para>Disabling RTTI in mockpp; has little consequences. It is only used for a +few diagnostic messages. In the worst case you might have to search for the +problematic class.</para> + +<para>Disabling the regular STL is also no problem as far as &mockpp; is +affected. If you use the minimalistic built-in STL for your own code you might +miss the one or the +other feature current implementations have. Either you find a workaround for +this or you implement what is missing. There are also STL implementations +available which are optimzied for embedded systems.</para> + +<para>The only real problem is exception handling. You can't simply turn his +feature off and continue with the programm flow instead of throwing. When +throwing an exception an application is typically in a critical state and its +objects tend to be unusable. Continuing to +use such an object is likely to crash the application. The other problem is the +fact that the compiler can't prepare a way back to destroy automatic variables. +This causes resource leaks.</para> + +<para>The only workaround so far is to immediately terminate the application. +A compromise might be to start a thread for each single test case and terminate +the thread upon the first malfunction. Probably this significantly slows down +the test execution. Another possibility is to split the tests into portable and +platform specific sections. The portable sections can be run on the development +machine with full speed very often wherereas the complete tests are run on the +target device only if appropriate. + <programlisting> |
From: Ewald A. <ewa...@us...> - 2005-12-03 18:13:15
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29426/mockpp/docs/en Modified Files: customize.xsl Makefile.am Log Message: compatibility problem Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/Makefile.am,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Makefile.am 1 Dec 2005 18:15:08 -0000 1.39 +++ Makefile.am 3 Dec 2005 18:13:00 -0000 1.40 @@ -24,6 +24,10 @@ ################################################################ +# java org.apache.xalan.xslt.Process \ +# -out var/ \ +# -in $(srcdir)/index.docbook \ +# -xsl $(srcdir)/customize-chunked.xsl html-chunk-files: -test -L tutorial && rm tutorial ln -s ../../examples/tutorial/html tutorial Index: customize.xsl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/customize.xsl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- customize.xsl 14 Nov 2005 19:42:14 -0000 1.11 +++ customize.xsl 3 Dec 2005 18:13:00 -0000 1.12 @@ -39,7 +39,7 @@ <xsl:param name="section.label.includes.component.label" select="1"/> <xsl:param name="callout.graphics.number.limit" select="'15'"/> <xsl:param name="use.id.as.filename" select="'1'"/> -<xsl:param name="use.extensions" select="'1'"/> +<xsl:param name="use.extensions" select="'0'"/> </xsl:stylesheet> |
From: Ewald A. <ewa...@us...> - 2005-12-03 15:56:41
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1247/mockpp/docs/en Modified Files: dev_embedded.docbook Log Message: extend Index: dev_embedded.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_embedded.docbook,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dev_embedded.docbook 2 Dec 2005 17:28:36 -0000 1.2 +++ dev_embedded.docbook 3 Dec 2005 15:56:33 -0000 1.3 @@ -1,45 +1,88 @@ <sect1 id="embedded-systems"> -<title>Embedded Systems</title> - +<title>Working With Embedded Systems</title> -<para>text +<para>There are hidden costs concerning memory resources when programming in +C++. On a desktop system with plenty of virtual memory you don't neccessarily +recognize it. But working with embedded systems is different as there is only a +limited amout of physical ram available.</para> -<programlisting> +<para>For that reasons it is important to know the places where he compiler adds +additional code: -Full featured: 322400 +<variablelist> -built-in stl: 230628 + <varlistentry> + <term>Standard Template Library (STL)</term> + <listitem>Templates and other inline code may increase the resulting footprint + of the binary.</listitem> + </varlistentry> -built-in stl, no rtti: 218204 + <varlistentry> + <term>Exceptions</term> + <listitem>After throwing an exception the complier must cleanup and + destroy all automatic objects in the previous scopes. This bookkeeping + consumes space as well.</listitem> + </varlistentry> -built-in stl, no exceptions: 193588 + <varlistentry> + <term>Runtime Type Information (RTTI)</term> + <listitem>To provide information about an object at runtime the + compiler includes data like the class name or the inheritance tree + in the binary. </listitem> + </varlistentry> -built-in stl, no rtti, no exceptions: 180588 +</variablelist> ------------- +</para> -Cost per feature +<para>The following table shows the the size of the &mockpp; library when +compiled with different settings. The size ranged from around 320KiB with the +default settings down to 180KiB with as many features disabled as possible. -stl: 91772 == 28% +<table><title>Proportion of Important Features</title> +<tgroup cols='3' align='left' colsep='1' rowsep='1'> +<thead> + <row> + <entry>Feature</entry><entry>Number of Bytes</entry><entry>Percentage</entry> + </row> +</thead> -rtti: 12424 == 4% +<tbody> + <row> + <entry>regular STL</entry><entry>92KiB</entry><entry>28%</entry> + </row> -exceptions: 37040 == 11% + <row> + <entry>RTTI</entry><entry>12KiB</entry><entry>4%</entry> + </row> -production code: 188588 = 58% + <row> + <entry>Exceptions</entry><entry>37KiB</entry><entry>11%</entry> + </row> -</programlisting> + <row> + <entry>Library Code</entry><entry>180KiB</entry><entry>57%</entry> + </row> +</tbody> +</tgroup> +</table> </para> -<para>There are a few things that are not obvious but might become interesting: +<para> -<itemizedlist> +<programlisting> + +void forwardMalfunctionData(const T &e) + +#define MOCKPP_THROW(x) throw (x) +#define MOCKPP_RETHROW throw +#define MOCKPP_TRY try +#define MOCKPP_CATCH(x) (x) +#define MOCKPP_CATCH_ALL catch(...) + +</programlisting> - <listitem>In the same manner <literal>MOCKPP_STRING</literal> yields either a - <token>std::string</token> or a <token>std::wstring</token>. - </listitem> -</itemizedlist> </para> |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:10:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6135/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h Log Message: central exception handling Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- AbstractDynamicChainingMock.h 27 Nov 2005 17:27:57 -0000 1.37 +++ AbstractDynamicChainingMock.h 3 Dec 2005 13:10:30 -0000 1.38 @@ -318,7 +318,7 @@ virtual void mockInvocation( const I &invocation ) { if ( this->failure.get() != 0 ) - MOCKPP_THROW(*this->failure.get()); + forwardMalfunctionData(*this->failure.get()); MOCKPP_TRY { @@ -333,7 +333,7 @@ this->invocationDispatcher.get(), assertion.getMessage() ); this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); - MOCKPP_THROW(*this->failure.get()); + forwardMalfunctionData(*this->failure.get()); } #endif // MOCKPP_NO_EXCEPTIONS } @@ -380,7 +380,7 @@ void mockInvocation( const I &invocation ) \ { \ if ( this->failure.get() != 0 ) \ - MOCKPP_THROW(*this->failure.get()); \ + forwardMalfunctionData(*this->failure.get()); \ \ try \ { \ @@ -394,7 +394,7 @@ this->invocationDispatcher.get(), \ assertion.getMessage() ); \ this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ - MOCKPP_THROW(*this->failure.get()); \ + forwardMalfunctionData(*this->failure.get()); \ } \ } \ }; \ |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:10:38
|
Update of /cvsroot/mockpp/mockpp/mockpp/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6135/mockpp/compat Modified Files: AssertionFailedError.cpp Exception.h Log Message: central exception handling Index: AssertionFailedError.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/AssertionFailedError.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- AssertionFailedError.cpp 27 Nov 2005 17:27:57 -0000 1.15 +++ AssertionFailedError.cpp 3 Dec 2005 13:10:30 -0000 1.16 @@ -62,7 +62,7 @@ void assertionFailed(unsigned srcline, const char* srcfile, const String &message) { - MOCKPP_THROW(AssertionFailedError(srcline, srcfile, message)); + forwardMalfunctionData(AssertionFailedError(srcline, srcfile, message)); } Index: Exception.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Exception.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Exception.h 26 Nov 2005 17:56:44 -0000 1.16 +++ Exception.h 3 Dec 2005 13:10:30 -0000 1.17 @@ -96,6 +96,18 @@ }; +/** Handle exceptions based on errors and failures. + * The default implementation throws the object. + * @param e excption data + */ +template <typename T> +inline +void forwardMalfunctionData(const T &e) +{ + MOCKPP_THROW(e); +} + + } // namespace mockpp |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:10:23
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6040/mockpp/tests Modified Files: AssertMo_test.cpp compilecheck.cpp VerifyingTestCaller_test.cpp Log Message: central exception handling Index: compilecheck.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/compilecheck.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- compilecheck.cpp 27 Nov 2005 17:27:57 -0000 1.24 +++ compilecheck.cpp 3 Dec 2005 13:10:11 -0000 1.25 @@ -64,7 +64,7 @@ virtual void verify() { - // MOCKPP_THROW(AssertionFailedError()); + // forwardException(AssertionFailedError()); } }; @@ -99,7 +99,7 @@ virtual void verify() { - // MOCKPP_THROW(AssertionFailedException()); + // forwardException(AssertionFailedException()); } }; @@ -142,7 +142,7 @@ virtual void verify() { - // MOCKPP_THROW(AssertionFailedException()); + // forwardException(AssertionFailedException()); } }; @@ -312,7 +312,7 @@ try { std::cout << "throw?\n"; - MOCKPP_THROW(ex); + forwardException(ex); } catch(std::exception *ex) { Index: AssertMo_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AssertMo_test.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- AssertMo_test.cpp 28 Nov 2005 19:03:09 -0000 1.26 +++ AssertMo_test.cpp 3 Dec 2005 13:10:11 -0000 1.27 @@ -345,7 +345,7 @@ #ifndef MOCKPP_NO_EXCEPTIONS static void do_a_throw(unsigned val) { - MOCKPP_THROW((unsigned) val); + mockpp::forwardMalfunctionData((unsigned) val); } #endif Index: VerifyingTestCaller_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VerifyingTestCaller_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- VerifyingTestCaller_test.cpp 1 Dec 2005 18:15:08 -0000 1.9 +++ VerifyingTestCaller_test.cpp 3 Dec 2005 13:10:11 -0000 1.10 @@ -108,7 +108,7 @@ void thrower() { - MOCKPP_THROW(1); + mockpp::forwardMalfunctionData(1); } }; |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:10:23
|
Update of /cvsroot/mockpp/mockpp/mockpp/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6040/mockpp/util Modified Files: AssertMo.cpp Log Message: central exception handling Index: AssertMo.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AssertMo.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- AssertMo.cpp 27 Nov 2005 17:27:57 -0000 1.21 +++ AssertMo.cpp 3 Dec 2005 13:10:12 -0000 1.22 @@ -124,7 +124,7 @@ { mockpp::String fmt = mockpp_i18n(MOCKPP_PCHAR("Not Implemented in %1.")); fmt << mockName; - MOCKPP_THROW(NotImplementedException(srcline, srcfile, fmt)); + forwardMalfunctionData(NotImplementedException(srcline, srcfile, fmt)); } |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:10:23
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6040/mockpp Modified Files: mockpp.h Throwable.h Log Message: central exception handling Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- mockpp.h 1 Dec 2005 18:15:08 -0000 1.65 +++ mockpp.h 3 Dec 2005 13:10:12 -0000 1.66 @@ -212,26 +212,26 @@ #else -#define CPPUNIT_DISABLE_EXCEPTIONS // ea-hack +#define CPPUNIT_DISABLE_EXCEPTIONS // ea-hack not available in official cppunit # ifndef MOCKPP_THROW -# define MOCKPP_THROW(x) /**/ +# define MOCKPP_THROW(x) /* nothing */ # endif # ifndef MOCKPP_RETHROW -# define MOCKPP_RETHROW /**/ +# define MOCKPP_RETHROW /* nothing */ # endif # ifndef MOCKPP_TRY -# define MOCKPP_TRY /**/ +# define MOCKPP_TRY /* nothing */ # endif # ifndef MOCKPP_CATCH -# define MOCKPP_CATCH(x) if(false) +# define MOCKPP_CATCH(x) if(false) /* usage limited */ # endif # ifndef MOCKPP_CATCH_ALL -# define MOCKPP_CATCH_ALL +# define MOCKPP_CATCH_ALL /* nothing */ # endif #endif Index: Throwable.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Throwable.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Throwable.h 27 Nov 2005 17:27:56 -0000 1.16 +++ Throwable.h 3 Dec 2005 13:10:12 -0000 1.17 @@ -76,7 +76,7 @@ virtual void throw_me() { ++thrown; - MOCKPP_THROW(obj); + forwardMalfunctionData(obj); } |
From: Ewald A. <ewa...@us...> - 2005-12-03 13:09:32
|
Update of /cvsroot/mockpp/mockpp/3party/ministl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5788/3party/ministl/tests Modified Files: ministl_test.cpp Log Message: typo Index: ministl_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/tests/ministl_test.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ministl_test.cpp 2 Dec 2005 17:30:32 -0000 1.5 +++ ministl_test.cpp 3 Dec 2005 13:09:19 -0000 1.6 @@ -171,7 +171,7 @@ { ministl::set<int> ss; ss.insert(2); - if (mm.size() != 1) + if (ss.size() != 1) return 1; return 0; |
From: Ewald A. <ewa...@us...> - 2005-12-02 17:30:40
|
Update of /cvsroot/mockpp/mockpp/3party/ministl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8823/3party/ministl/tests Modified Files: ministl_test.cpp Log Message: update Index: ministl_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/tests/ministl_test.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ministl_test.cpp 1 Dec 2005 19:43:03 -0000 1.4 +++ ministl_test.cpp 2 Dec 2005 17:30:32 -0000 1.5 @@ -167,6 +167,17 @@ } +bool set_test() +{ + ministl::set<int> ss; + ss.insert(2); + if (mm.size() != 1) + return 1; + + return 0; +} + + int main(int /*argc*/, char** /*argv*/) { unsigned ret = 0; @@ -174,11 +185,7 @@ ret |= vector_test(); ret |= multimap_test(); ret |= map_test(); - - ministl::pair<int, double> pp(1, 1.1); - - ministl::set<int> ss; - ss.insert(2); + ret |= set_test(); return ret; } |
From: Ewald A. <ewa...@us...> - 2005-12-02 17:28:45
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8261/mockpp/docs/en Modified Files: appendix.docbook credits.docbook dev_advanced_easymock.docbook dev_advanced_intro.docbook dev_advanced_jmock.docbook dev_basic.docbook dev_embedded.docbook faq.docbook index.docbook Log Message: fix typos Index: appendix.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/appendix.docbook,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- appendix.docbook 28 Nov 2005 19:03:09 -0000 1.12 +++ appendix.docbook 2 Dec 2005 17:28:36 -0000 1.13 @@ -19,8 +19,9 @@ <para> In order to fully benefit from &mockpp;, you need -<ulink url="http://cppunit.sf.net">CppUnit</ulink>, a framework for unit tests -with C++.</para> +<ulink url="http://cppunit.sf.net">&cppunit;</ulink>, a framework for unit tests +with C++. Any other framework should work for development as well but &cppunit; +is used for the internal unittests.</para> </sect1> @@ -84,6 +85,14 @@ </listitem> </varlistentry> + <varlistentry> + <term>--enable-builtin-stl</term> + <listitem>By default &mockpp; is compiled with the C++ Standard Template Libray that + comes with your compiler. Unfortunately the current implementations consume + rather much resources. For that reason a built-in minimalistic STL can be used. + </listitem> + </varlistentry> + </variablelist> @@ -157,8 +166,8 @@ <sect2 id="installing-cygwin"> <title>Installing on systems using Cygwin</title> -<para>There have been reports about problemx to compile and link -with cppunit on Windows system under Cygwin. A solution might be to be to link +<para>There have been reports about problems to compile and link +with &cppunit; on Windows system under &cygwin;. A solution might be to be to link statically. First compile &cppunit; (and possibly force installation with -k): </para> Index: dev_embedded.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_embedded.docbook,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dev_embedded.docbook 1 Dec 2005 18:15:08 -0000 1.1 +++ dev_embedded.docbook 2 Dec 2005 17:28:36 -0000 1.2 @@ -1,4 +1,4 @@ -<sect1 id="devel-embedded"> +<sect1 id="embedded-systems"> <title>Embedded Systems</title> Index: dev_advanced_jmock.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_jmock.docbook,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- dev_advanced_jmock.docbook 20 Nov 2005 10:02:25 -0000 1.16 +++ dev_advanced_jmock.docbook 2 Dec 2005 17:28:36 -0000 1.17 @@ -45,7 +45,7 @@ </programlisting> -You need not provide each of these methods, only what you actually need. If you don't intend +You need not provide all of these methods, only what you actually need. If you don't intend to return a special value: omit <methodname>will()</methodname> and the default return value will be used.</para> @@ -100,12 +100,12 @@ wrapper functions instead:</para> <itemizedlist> - <listitem><methodname>once()</methodname>: exactly one single invocation</listitem> - <listitem><methodname>exactly()</methodname>: an exact invocation count</listitem> + <listitem><methodname>InvokeOnceMatcher</methodname> = <methodname>once()</methodname>: exactly one single invocation</listitem> + <listitem><methodname>InvokeCountMatcher</methodname> = <methodname>exactly()</methodname>: an exact invocation count</listitem> + <listitem><methodname>InvokeAtLeastMatcher</methodname> = <methodname>atLeast()</methodname>: a minimum invocation count</listitem> + <listitem><methodname>InvokeAtLeastOnceMatcher</methodname> = <methodname>atLeastOnce()</methodname>: invoke the method at least once</listitem> + <listitem><methodname>InvokeAtMostMatcher</methodname> = <methodname>atMost()</methodname>: a maximum invocation count</listitem> <listitem><methodname>never()</methodname>: never invoke this method</listitem> - <listitem><methodname>atLeast()</methodname>: a minimum invocation count</listitem> - <listitem><methodname>atLeastOnce()</methodname>: invoke the method at least once</listitem> - <listitem><methodname>atMost()</methodname>: a maximum invocation count</listitem> </itemizedlist> <para>After setting up the behaviour and actually invoking the mock object the matcher specifications @@ -152,22 +152,22 @@ previous invocation.</para> <para>The distribution already contains a set of classes for common -constraints. For convenience reasons and to enhance readability some of these -classes have a counterpart in the form of a method.The most important are:</para> +constraints. For convenience reasons and to enhance readability most of these +classes have a counterpart in the form of a method.The most important ones are:</para> <itemizedlist> - <listitem><classname>IsEqual</classname>/<methodname>eq()</methodname> tests equality</listitem> - <listitem><classname>IsSame</classname>/<methodname>same()</methodname> tests if two objects are the same</listitem> - <listitem><classname>IsCloseTo</classname>/<methodname>eq(a,b)</methodname> tests near equality</listitem> - <listitem><classname>IsGreaterThan</classname>/<methodname>gt()</methodname> is true for higher values a reference value</listitem> - <listitem><classname>IsLessThan</classname>/<methodname>lt()</methodname> is true for lower values than a reference value</listitem> - <listitem><classname>IsNot</classname>/<methodname>logic_not()</methodname> negates another contraint</listitem> - <listitem><classname>And</classname>/<methodname>logic_and()</methodname> provides a logical-and of two constraints</listitem> - <listitem><classname>Or</classname>/<methodname>logic_or()</methodname> provides a logical-or of two constraints</listitem> - <listitem><classname>IsAnything</classname>/<methodname>any()</methodname> is always true</listitem> - <listitem><classname>IsNothing</classname>/<methodname>nothing()</methodname> is never true</listitem> - <listitem><classname>StringContains</classname>/<methodname>stringContains()</methodname> checks for the occurence of a substring</listitem> - <listitem><classname>IsInstanceOf</classname>/<methodname>isA()</methodname> tests if an object is of a type</listitem> + <listitem><classname>IsEqual</classname> = <methodname>eq()</methodname> tests equality</listitem> + <listitem><classname>IsSame</classname> = <methodname>same()</methodname> tests if two objects are the same</listitem> + <listitem><classname>IsCloseTo</classname> = <methodname>eq(a,b)</methodname> tests near equality</listitem> + <listitem><classname>IsGreaterThan</classname> = <methodname>gt()</methodname> is true for higher values a reference value</listitem> + <listitem><classname>IsLessThan</classname> = <methodname>lt()</methodname> is true for lower values than a reference value</listitem> + <listitem><classname>IsNot</classname> = <methodname>logic_not()</methodname> negates another contraint</listitem> + <listitem><classname>And</classname> = <methodname>logic_and()</methodname> provides a logical-and of two constraints</listitem> + <listitem><classname>Or</classname> = <methodname>logic_or()</methodname> provides a logical-or of two constraints</listitem> + <listitem><classname>IsAnything</classname> = <methodname>any()</methodname> is always true</listitem> + <listitem><classname>IsNothing</classname> = <methodname>nothing()</methodname> is never true</listitem> + <listitem><classname>StringContains</classname> = <methodname>stringContains()</methodname> checks for the occurence of a substring</listitem> + <listitem><classname>IsInstanceOf</classname> = <methodname>isA()</methodname> tests if an object is of a type</listitem> </itemizedlist> <para>Creating your own constraints is quite easy. Look at the files in the @@ -208,7 +208,7 @@ <function>isSameComparison</function> which implements this default behaviour. If you need a differing implementation for a certain class you can provide a specialized template. This may happen if you are using a shared pointer and -don't want to compare the this helper but the shared object at the end of +don't want to compare the helper but the shared object at the end of the pointers.</para> <para>For a similar reason there is another templated function @@ -272,8 +272,8 @@ <sect3> <title>Return Values and Exceptions</title> -<para>Return values from methods and exceptions are treated similar as exceptions are -considered here not more than a special kind of return value. You may determine the return value +<para>Return values from methods and exceptions are treated similar. Exceptions are +considered not more than a special kind of return value. You may determine the return value based on the result of the parameters you passed with <methodname>expects()</methodname> and <methodname>with()</methodname> or you can optionally set a default action by passing it to <methodname>setDefaultStub()</methodname>. Index: faq.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/faq.docbook,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- faq.docbook 1 Aug 2005 18:21:12 -0000 1.9 +++ faq.docbook 2 Dec 2005 17:28:36 -0000 1.10 @@ -10,7 +10,8 @@ <qandaentry> <question> - <para>I have the following simple method but it does not compile.</para> + <para>I have the following simple method but it does not compile when + using the macros.</para> <para> <programlisting> @@ -42,7 +43,9 @@ <para>A similar problem arises when you need to pass values back by a parameter reference. In this case you can use <link linkend="outbound"><classname>OutBound</classname></link> - to return predefined values.</para> + to return predefined values. Please also understand that this problem + does not arise when using the mock method templates. In this case + you have to create the forwarding method anyway.</para> </answer> Index: index.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/index.docbook,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- index.docbook 1 Dec 2005 18:15:08 -0000 1.33 +++ index.docbook 2 Dec 2005 17:28:36 -0000 1.34 @@ -7,11 +7,12 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ <!ENTITY mockpp '<application>mockpp</application>' > - <!ENTITY cppunit '<application>cppunit</application>' > + <!ENTITY cppunit '<application>CppUnit</application>' > + <!ENTITY cygwin '<application>Cygwin</application>' > <!ENTITY copyyears '2002-2005' > <!ENTITY mockpp_email 'mockpp at ewald-arnold dot de' > <!ENTITY release_date '<pubdate>Published: <?dbtimestamp format="Y-m-d"?></pubdate>' > - <!ENTITY release_info '<releaseinfo>1.10.00</releaseinfo>' > + <!ENTITY release_info '<releaseinfo>1.11.00</releaseinfo>' > <!ENTITY chap_bookinfo SYSTEM 'bookinfo.docbook' > <!ENTITY chap_intro SYSTEM 'intro.docbook' > Index: dev_advanced_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_intro.docbook,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- dev_advanced_intro.docbook 19 Nov 2005 19:14:29 -0000 1.8 +++ dev_advanced_intro.docbook 2 Dec 2005 17:28:36 -0000 1.9 @@ -72,8 +72,8 @@ <calloutlist> <callout arearefs="interface1-class-co" id="interface1-class" > - <para>Define an interface class which contains all the methods that must - simulate some real world behaviour. This interface class is also used + <para>Define an interface class which contains all the methods that + describe some real world behaviour. This interface class is also used to implement the real world class.</para> <para> The intention is to pass a real world object in the running application or a mock object while executing tests.</para> @@ -108,14 +108,14 @@ <sect3> <title>The Main Mock Object Classes</title> -<para>Since most of tasks concerning mock objects occur frequently and in a similar +<para>Since most of the tasks concerning mock objects occur frequently and in a similar manner there are some classes which support automated behaviour with different approaches. Depending on your personal taste or special problems you may choose the one or the other.</para> <itemizedlist> <listitem>The first possibility is modeled by a class called <classname>VisitableMockObject</classname>. It was named like this -because you set up part of it's behaviour by recording an execution path for the tests, +because you set up part of its behaviour by recording an execution path for the tests, thus by "visiting" the object. This approach is rather strict because the invocation order and parameter values must match exactly. Unfortunatley it is almost impossible to add new capabilities. @@ -174,7 +174,7 @@ <para>For both the Visitable and the Chainable types there are sets of templates for mock methods according to the number of parameters the method under test takes. But most of - the current compilers support a short hand version which selects the needed + the current compilers support a shorthand version which selects the needed template automatically.</para> <para>So the following lines are equivalent: @@ -230,14 +230,21 @@ <listitem>If you have overloaded methods you must use the extended macros as well. They extend the internal variables names which are derived form the method name. Otherwise there would be a conflict.</listitem> - <listitem>It may become necessary to implement <methodname>operator<<()</methodname> as + <listitem><para>It may become necessary to implement <methodname>operator<<()</methodname> as debug output is created this way. One approach is to provide a meaningful operator method. If this does not make much sense you may use a default template instead which simply outputs the raw classname. To avoid pontential conflicts this template must be enabled by setting the macro <token>MOCKPP_ENABLE_DEFAULT_FORMATTER</token> before including the first &mockpp; header - file.</listitem> + file.</para> + <para>It is also possible to re-use an existing + <methodname>operator<<(std::ostream & const T &val)</methodname>. + In this case you supply depending on the string type one of the macros + <token>MOCKPP_OWSTREAMABLE</token> + or <token>MOCKPP_OSTREAMABLE</token>. This implements a simple string translator function. + </para> + </listitem> </itemizedlist> </para> @@ -327,11 +334,15 @@ <para>After the last invocation to a mock object has occured you should always invoke <methodname>verify()</methodname> on the mock object to verify all pending expectations. Maybe there are some unused return objects or outstanding calls. If you use &cppunit; as -test framework you should the use <classname>VerifyingTestCase</classname> from &mockpp; +test framework you should use <classname>VerifyingTestCase</classname> from &mockpp; and register your mock objects on creation with it. In contrast to the standard <classname>TestCase</classname> from the &cppunit; package it invokes <methodname>verify()</methodname> on all mock objects after a test case passed. This way it is impossible to forget it.</para> +<para>Unfortunately this class is partially based on an error in reasoning and became +more complicated as originally thought. So it is less useful as expected. Decide +yourself if it is of any advantage in your application.</para> + </sect3> </sect2> Index: credits.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/credits.docbook,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- credits.docbook 20 Nov 2004 20:32:59 -0000 1.3 +++ credits.docbook 2 Dec 2005 17:28:36 -0000 1.4 @@ -8,10 +8,8 @@ <title>Credits and License</title> <para> -&mockpp; -</para> -<para> -Program copyright ©years; Ewald Arnold <email>&mockpp_email;</email> +Library &mockpp; +copyright ©years; Ewald Arnold <email>&mockpp_email;</email> </para> <para> @@ -33,4 +31,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</para> +<para>The files below the directory <filename>3party</filename> are copyright +of the respective owners. See the according files for details.</para> </chapter> Index: dev_advanced_easymock.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_easymock.docbook,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- dev_advanced_easymock.docbook 17 Nov 2005 21:08:52 -0000 1.9 +++ dev_advanced_easymock.docbook 2 Dec 2005 17:28:36 -0000 1.10 @@ -46,12 +46,12 @@ MyVisitableMockObject mvo("mvo"); - MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, access) access_ctr (&mvo); <co id="mock-controller-co" linkends="mock-controller" /> + MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, access) ctr (&mvo); <co id="mock-controller-co" linkends="mock-controller" /> - access_ctr.addThrowable(std::string("throw"), 2); <co id="mock-feed1-co" linkends="mock-feed1" /> - access_ctr.addResponseValue(1, 13); <co id="mock-feed2-co" linkends="mock-feed2" /> - access_ctr.addResponseValue(2, 37); - access_ctr.addResponseValue(3, lt(50u)); <co id="mock-gt-co" linkends="mock-gt" /> + ctr.addThrowable(std::string("throw"), 2); <co id="mock-feed1-co" linkends="mock-feed1" /> + ctr.addResponseValue(1, 13); <co id="mock-feed2-co" linkends="mock-feed2" /> + ctr.addResponseValue(2, 37); + ctr.addResponseValue(3, lt(50u)); <co id="mock-gt-co" linkends="mock-gt" /> mvo.access(1); <co id="mock-feed3-co" linkends="mock-feed3" /> mvo.access(13); @@ -83,12 +83,12 @@ </callout> <callout arearefs="mock-method-co" id="mock-method" > - <para>Similarly add another macro that implements the method with it's internal + <para>Similarly add another macro that implements the method with its internal variables and helper methods.</para> </callout> <callout arearefs="mock-controller-co" id="mock-controller" > - <para>Create a controller object for the method to set up it's + <para>Create a controller object for the method to set up its behaviour.</para> </callout> @@ -105,7 +105,7 @@ <callout arearefs="mock-gt-co" id="mock-gt" > <para>The former controller parameters where strict and demanded exact equality. By using <link linkend="parameter-constraint">constraint objects</link> it is possible - to use arbitrary tolerance. In the example the parameter must be greater than 50 + to use arbitrary tolerance. In the example the parameter must be less than 50 to return 3.</para> </callout> @@ -174,12 +174,12 @@ MyVisitableMockObject mvmo("mvmo"); - VisitableMockMethod1<int, unsigned> &access_ctr (mvmo.access_mocker); <co id="mockmeth-ref-co" linkends="mockmeth-ref" /> + VisitableMockMethod1<int, unsigned> &ctr (mvmo.access_mocker); <co id="mockmeth-ref-co" linkends="mockmeth-ref" /> - access_ctr.addThrowable(std::string("throw"), 2); - access_ctr.addResponseValue(1, 13); - access_ctr.addResponseValue(2, 37); - access_ctr.addResponseValue(3, eq(50u)); <co id="mockmeth-setup-co" linkends="mockmeth-setup" /> + ctr.addThrowable(std::string("throw"), 2); + ctr.addResponseValue(1, 13); + ctr.addResponseValue(2, 37); + ctr.addResponseValue(3, eq(50u)); <co id="mockmeth-setup-co" linkends="mockmeth-setup" /> mvmo.access(1); mvmo.access(13); @@ -214,7 +214,7 @@ <callout arearefs="mockmeth-var-co" id="mockmeth-var" > <para>Instantiate a mock method variable. Select the class according - to the parameters the method takes. There also a template without a trailing + to the parameters the method takes. There is also a template without a trailing number which handles an arbitrary parameter count.</para> </callout> Index: dev_basic.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_basic.docbook,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- dev_basic.docbook 24 Nov 2005 19:17:37 -0000 1.12 +++ dev_basic.docbook 2 Dec 2005 17:28:36 -0000 1.13 @@ -61,7 +61,12 @@ The most common application is the use of <classname>ExpectationValue</classname> which does an exact comparision. Your own data types should implement a meaningful <methodname>operator==()</methodname> to be usable with &mockpp;. -The following example creates an expectation value for <token>int</token> values. +Depending on your type <methodname>operator<()</methodname> +can replace the formar operator by supplying a template which does the following +computation: <code>!(x < y) && !(y < x)</code>.</para> + +<para>The following example creates an expectation value for <token>int</token> +values. <programlisting> @@ -151,7 +156,7 @@ <para> There are also cases where you have a number of values which must all occur but the -order is not relevant at all. t even does not matter if an actual value is added +order is not relevant at all. It even does not matter if an actual value is added more than once. For that purpose &mockpp; provides a set oriented data type. See the next example: @@ -268,10 +273,11 @@ If you want to track events which are related to each other you might use the two classes <classname>TrackingCounterMaster</classname> and <classname>TrackingCounterClient</classname>. The master contains -a shared conter value. Each time one of the clients is activated it gets the current value -from the master and stores it. The value inside the master is incremented at the same -time. This way you can roughly check the order in which the clients were accessed. -It is also possible to retrieve each counter value of a client and not only the last one. +a shared conter value. Each time one of the clients is activated it gets the +current value from the master and stores it. The value inside the master is +incremented at the same time. This way you can roughly check the order in which +the clients were accessed. It is also possible to retrieve each counter value +of a client and not only the last one. <programlisting> |
From: Ewald A. <ewa...@us...> - 2005-12-01 19:43:14
|
Update of /cvsroot/mockpp/mockpp/3party/ministl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21140/3party/ministl/tests Modified Files: ministl_test.cpp Log Message: ministl fully working Index: ministl_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/tests/ministl_test.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ministl_test.cpp 1 Dec 2005 18:15:08 -0000 1.3 +++ ministl_test.cpp 1 Dec 2005 19:43:03 -0000 1.4 @@ -54,6 +54,8 @@ bool map_test() { + std::cout << "Start map iter-test: \n"; + ministl::map<int, unsigned> mm; ministl::pair<int, unsigned> p(11, 22u); mm.insert(ministl::make_pair(11, 22u)); @@ -63,23 +65,59 @@ if (mm.size() != 1) return 1; + mm.insert(ministl::make_pair(111, 222u)); + mm.insert(ministl::make_pair(1111, 2222u)); + + ministl::map<int, unsigned>::iterator fit = mm.begin(); + while (fit != mm.end()) + { + std::cout << "fit++ " << (*fit).first + << " " << (*fit).second << std::endl; + ++fit; + } + + std::cout << "End map iter-test: \n"; + return 0; } bool multimap_test() { + std::cout << "Start multimap iter-test: \n"; + ministl::multimap<unsigned, signed> mm; - mm.insert(ministl::make_pair(1u, 2)); - mm.insert(ministl::make_pair(1u, 2)); - mm.insert(ministl::make_pair<unsigned, signed>(1u, 2)); + mm.insert(ministl::make_pair(3u, 2)); + mm.insert(ministl::make_pair(10u, 2)); + mm.insert(ministl::make_pair(1u, 22)); + mm.insert(ministl::make_pair(10u, 22)); + mm.insert(ministl::make_pair<unsigned, signed>(1u, 222)); + mm.insert(ministl::make_pair(2u, 22)); // lower_bound // upper_bound -/* - if (mm.size() != 3) // @todo + + if (mm.size() != 6) return 1; -*/ + + ministl::multimap<unsigned, signed>::iterator fit = mm.begin(); + if ((*fit++).first != 1) return 1; + if ((*fit++).first != 1) return 1; + if ((*fit++).first != 2) return 1; + if ((*fit++).first != 3) return 1; + if ((*fit++).first != 10) return 1; + if ((*fit++).first != 10) return 1; + + fit = mm.begin(); + while (fit != mm.end()) + { + std::cout << "fit++ " << (*fit).first + << " " << (*fit).second << std::endl; + ++fit; + } + + std::cout << "End multimap iter-test: \n"; + return 0; } @@ -91,7 +129,7 @@ vv.push_back(2u); vv.push_back(3u); - std::cout << "Start iter-test:\n"; + std::cout << "Start vector iter-test:\n"; ministl::vector<unsigned>::iterator fit = vv.begin(); if (*fit != 1) @@ -123,7 +161,7 @@ while (rit != vv.rbegin()) std::cout << "rit-- " << *--rit << std::endl; - std::cout << "Ende iter-test: \n"; + std::cout << "End vector iter-test: \n"; return 0; } |
From: Ewald A. <ewa...@us...> - 2005-12-01 19:43:12
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21140/mockpp/examples Modified Files: mock_greeter.cpp Log Message: ministl fully working Index: mock_greeter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/mock_greeter.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- mock_greeter.cpp 7 May 2005 12:46:19 -0000 1.17 +++ mock_greeter.cpp 1 Dec 2005 19:43:03 -0000 1.18 @@ -367,19 +367,19 @@ { int ret = 1; #ifdef HAVE_CPPUNIT - std::cout << mockpp::getLatin1(mockpp_i18n("Now running cppunit tests:\n\n")); + std::cout << mockpp::getLatin1(mockpp_i18n("Now running cppunit tests:\n\n")).c_str(); CppUnit::TextUi::TestRunner runner; CppUnit::TestFactory ®istry = CppUnit::TestFactoryRegistry::getRegistry(); runner.addTest(registry.makeTest()); ret = runner.run(); #else - std::cout << mockpp::getLatin1(mockpp_i18n("CppUnit was not available at compile time!\n")); - std::cout << mockpp::getLatin1(mockpp_i18n("Will use mockpp features only.\n\n")); + std::cout << mockpp::getLatin1(mockpp_i18n("CppUnit was not available at compile time!\n")).c_str(); + std::cout << mockpp::getLatin1(mockpp_i18n("Will use mockpp features only.\n\n")).c_str(); #endif try { - std::cout << mockpp::getLatin1(mockpp_i18n("Now running some tests with just mockpp features:\n\n")); + std::cout << mockpp::getLatin1(mockpp_i18n("Now running some tests with just mockpp features:\n\n")).c_str(); Streamer_test st; st.test_write_ok(); @@ -411,12 +411,12 @@ } catch(mockpp::Exception &ex) { - std::cout << "file: " << mockpp::getLatin1(ex.getSrcFile()) << std::endl + std::cout << "file: " << mockpp::getLatin1(ex.getSrcFile()).c_str() << std::endl << "line: " << ex.getSrcLine() << std::endl - << "msg : " << mockpp::getLatin1(ex.getMessage()) << std::endl; + << "msg : " << mockpp::getLatin1(ex.getMessage()).c_str() << std::endl; ret = 1; } - std::cout << mockpp::getLatin1(mockpp_i18n("Finished.\n")); + std::cout << mockpp::getLatin1(mockpp_i18n("Finished.\n")).c_str(); return ret; } |
From: Ewald A. <ewa...@us...> - 2005-12-01 19:43:12
|
Update of /cvsroot/mockpp/mockpp/3party/ministl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21140/3party/ministl Modified Files: multimap Log Message: ministl fully working Index: multimap =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/multimap,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- multimap 1 Dec 2005 18:15:08 -0000 1.1 +++ multimap 1 Dec 2005 19:43:03 -0000 1.2 @@ -259,9 +259,11 @@ iterator insert (const value_type &v) { - iterator i = end(); - if (size() > 0 && lookup (v.first, i)) - return i; + iterator i; + if (size() == 0) + i = begin(); + else + lookup (v.first, i); i = iterator (_ents.insert (i.n, new value_type(v))); return i; |