[Mockpp-commits] mockpp/mockpp/docs/en appendix.docbook,1.21,1.22 dev_advanced_intro.docbook,1.10,1.
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2006-01-07 11:40:20
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14196/mockpp/docs/en Modified Files: appendix.docbook dev_advanced_intro.docbook dev_advanced_jmock.docbook dev_basic.docbook dev_embedded.docbook dev_helper.docbook dev_intro.docbook Log Message: update docs Index: appendix.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/appendix.docbook,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- appendix.docbook 6 Jan 2006 12:17:34 -0000 1.21 +++ appendix.docbook 7 Jan 2006 11:39:50 -0000 1.22 @@ -14,16 +14,11 @@ <ulink url="http://mockpp.sf.net">http://mockpp.sf.net</ulink></para> </sect1> -<sect1 id="requirements"> -<title>Requirements</title> - -</sect1> - <sect1 id="compilation"> <title>Compilation and Installation</title> <sect2 id="installing-autoconf"> -<title>Installing on systems using autoconf and friends</title> +<title>Installing on systems using <application>autoconf</application> and friends</title> <para>In order to compile and install mockpp on your system, type the following in the base directory of the &mockpp; distribution: @@ -35,7 +30,7 @@ </screen> </para> -There are some options for <userinput>configure</userinput> you might be interested in: +There are some options for <application>configure</application> you might be interested in: <variablelist> @@ -104,7 +99,7 @@ <varlistentry> <term>--enable-boosttest</term> - <listitem><para>This option enables Boost.Test as test framework.</para> + <listitem><para>This option enables &boost.test; as test framework.</para> </listitem> </varlistentry> @@ -120,11 +115,12 @@ </variablelist> -<para>Since mockpp uses autoconf and automake you should have no trouble compiling it. +<para>Since mockpp uses <application>autoconf</application> and +<application>automake</application> you should have no trouble compiling it. Should you run into problems please report them to the <ulink url="http://sourceforge.net/bugs/?group_id=69135">Bug Tracker</ulink>.</para> -<para>Once you have compiled the sources you should run the built in checks +<para>Once you have compiled the sources you should run the built-in checks to verify the correct behaviour on your platform: <screen width="40"> @@ -138,7 +134,7 @@ <!-- ===================================== --> <sect2 id="installing-cygwin"> -<title>Installing on systems using Cygwin</title> +<title>Installing on systems using &cygwin;</title> <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 @@ -193,9 +189,8 @@ <sect2 id="installing-others"> <title>Installing on other systems</title> -<para> -If you are using a compiler on a platform not directly supported you must setup you -own project files for your compiler. All adjustments are done in +<para>If you are using a compiler on a platform not directly supported you must +setup your own project files for your compiler. All adjustments are done in <filename class='headerfile'>mockpp.h</filename>. To benefit from updates it is of course better to move your own settings to a configuration file and include it. <para> @@ -213,7 +208,7 @@ <term><literal>MOCKPP_UNICODE</literal></term> <listitem><para>Enable unicode characters (based on <token>wchar_t</token>) instead of ascii characters.There are some related macros. <literal>MOCKPP_PCHAR</literal> - <literal>MOCKPP_CHAR</literal> are used to mark literal character strings + and <literal>MOCKPP_CHAR</literal> are used to mark literal character strings either with or without leading "L". <literal>MOCKPP_STRING</literal> and <literal>MOCKPP_PCSTRING</literal> are used to create a <token>String</token> variable. @@ -238,7 +233,8 @@ <para>If you want to use another STL you have to extend the according section in <filename>mockpp.h</filename>. Search for <literal>MOCKPP_USE_MINI_STL</literal> and add an appropriate section similar to the one for - <literal>ministl</literal>.</para> + <literal>ministl</literal>. Do the same for &cxxtest; in + <filename>3party/cxxtest/cxxtest/Flags.h</filename></para> </listitem> </varlistentry> @@ -278,14 +274,14 @@ <varlistentry> <term><literal>MOCKPP_BOUNDARY_DELTA</literal></term> <listitem><para>Include source code for - <function>ExpectationBoundary::setExpectedDelta()</function></para>. + <function>ExpectationBoundary::setExpectedDelta()</function></para> </listitem> </varlistentry> <varlistentry> <term><literal>MOCKPP_USE_STD_EXCEPTION</literal></term> <listitem><para>Derive <classname>mockpp::Exception</classname> - from <classname>std::exception</classname></para>. + from <classname>std::exception</classname></para> </listitem> </varlistentry> Index: dev_embedded.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_embedded.docbook,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- dev_embedded.docbook 5 Jan 2006 20:17:11 -0000 1.11 +++ dev_embedded.docbook 7 Jan 2006 11:39:50 -0000 1.12 @@ -16,22 +16,22 @@ <varlistentry> <term>Standard Template Library (STL)</term> - <listitem>Templates and other inline code may increase the resulting footprint - of the binary.</listitem> + <listitem><para>Templates and other inline code may increase the resulting footprint + of the binary.</para></listitem> </varlistentry> <varlistentry> <term>Exceptions</term> - <listitem>After throwing an exception the complier must cleanup and + <listitem><para>After throwing an exception the complier must cleanup and destroy all automatic objects in the previous scopes. This bookkeeping - consumes space as well.</listitem> + consumes space as well.</para></listitem> </varlistentry> <varlistentry> <term>Runtime Type Information (RTTI)</term> - <listitem>To provide information about an object at runtime the + <listitem><para>To provide information about an object at runtime the compiler includes data like the class name or the inheritance tree - in the binary. </listitem> + in the binary.</para></listitem> </varlistentry> </variablelist> Index: dev_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_intro.docbook,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- dev_intro.docbook 5 Jan 2006 19:13:55 -0000 1.9 +++ dev_intro.docbook 7 Jan 2006 11:39:50 -0000 1.10 @@ -43,7 +43,7 @@ </itemizedlist> -<para>See <xref linkend="configuration" /> for more option how to adjust +<para>See <xref linkend="configuration" /> for more options how to adjust this library.</para> </para> Index: dev_basic.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_basic.docbook,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- dev_basic.docbook 6 Jan 2006 12:17:34 -0000 1.15 +++ dev_basic.docbook 7 Jan 2006 11:39:50 -0000 1.16 @@ -62,7 +62,7 @@ which does an exact comparison. Your own data types should implement a meaningful <methodname>operator==()</methodname> to be usable with &mockpp;. Depending on your type <methodname>operator<()</methodname> -can replace the formar operator by supplying a template which does the following +can replace the former 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> Index: dev_advanced_jmock.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_jmock.docbook,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- dev_advanced_jmock.docbook 27 Dec 2005 18:01:44 -0000 1.18 +++ dev_advanced_jmock.docbook 7 Jan 2006 11:39:50 -0000 1.19 @@ -9,16 +9,6 @@ <sect3> <title>Overview</title> -<para>When a method is invoked on a mock object, the mock object searches -through its expectations from first to last to find one that matches the -invocation. An expectation matches an invocation if all of its -matching rules match the invocation. After the invocation, the matching expectation -might stop matching -further invocations. For example, an <methodname>expects(once())</methodname> -expectation only matches once and will be ignored on future invocations while an -<methodname>expects(atLeastOnce())</methodname> -expectation will always be matched against invocations.</para> - <para>Specifying some behaviour with chainable mock objects is similar to describing it in words. You may say for example: @@ -53,12 +43,22 @@ <methodname>will()</methodname> to explicitly express this fact.</para> +<para>When a method is invoked on a chainable mock object, the mock object searches +through its expectations from first to last to find one that matches the +invocation. An expectation matches an invocation if all of its +matching rules match the invocation. After the invocation, the matching expectation +might stop matching +further invocations. For example, an <methodname>expects(once())</methodname> +expectation only matches once and will be ignored on future invocations while an +<methodname>expects(atLeastOnce())</methodname> +expectation will always be matched against invocations.</para> + <para>The original java implementation contained an additional method called <methodname>method()</methodname> which passed the desired method name. This is completely missing in my C++ implementation. The reason is simple: C++ does not support reflection and therefor an application can't look into itself or create methods at runtime or do some other weird things. So I had to apply a handful of -macro-magic instead. This led to the +macro-magic and templates instead. This led to the fact that you have to set up a different helper object for <emphasis>each method</emphasis> whereas jMock would use the same object for all calls of a mock object.</para> @@ -134,18 +134,16 @@ on an invocation to a totally different mock object. And it is also possible to add more than one call to <methodname>before()</methodname> or <methodname>after()</methodname> if you want to -have it match to more than one invocation in the same expectation chain.</para> - -<para>For that purpose you use the methods -<methodname>before()</methodname> or <methodname>after()</methodname>.</para> +have it match against more than one invocation in the same expectation chain.</para> </sect3> <sect3 id="parameter-constraint"> <title>Parameter Constraints</title> -<para>When working with a <classname>VisitableMockObject</classname> you specify exactly -which parameter value you expect. A <classname>ChainableMockObject</classname> +<para>When working with a <classname>VisitableMockObject</classname> +you normally specify exactly which parameter value you expect. A +<classname>ChainableMockObject</classname> on the other hand can work less strict. Specifying an exact match is common but you may as well allow a set of values or even any value. Or you demand that each value must be higher than the one in the @@ -153,7 +151,8 @@ <para>The distribution already contains a set of classes for common 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> +classes have a counterpart in the form of a wrapper function. The most important +ones are:</para> <itemizedlist> <listitem><classname>IsEqual</classname> = <methodname>eq()</methodname> tests equality</listitem> Index: dev_advanced_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_intro.docbook,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- dev_advanced_intro.docbook 27 Dec 2005 18:01:44 -0000 1.10 +++ dev_advanced_intro.docbook 7 Jan 2006 11:39:50 -0000 1.11 @@ -239,7 +239,7 @@ <token>MOCKPP_ENABLE_DEFAULT_FORMATTER</token> before including the first &mockpp; header file.</para> <para>It is also possible to re-use an existing - <methodname>operator<<(std::ostream & const T &val)</methodname>. + <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. Index: dev_helper.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_helper.docbook,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- dev_helper.docbook 28 Dec 2005 21:35:12 -0000 1.12 +++ dev_helper.docbook 7 Jan 2006 11:39:50 -0000 1.13 @@ -76,7 +76,7 @@ documentation for <filename class='headerfile'>Asserter.h</filename> and <filename class='headerfile'>AssertMo.h</filename> -for a complete list. There you find also a detailed description of +for a complete list. There you will also find a detailed description of the above macros and the functions behind them. </para> @@ -99,9 +99,9 @@ translations when the positions of the substituted parameters are swapped for grammatical reasons.</para> -<para>So I decided to implement a typesafe approach which also takes into account -the position of the substituted values: each inserted value is converted into -its string representation and substitutes the placeholder +<para>So I decided to implement a typesafe approach which also takes the +position of the substituted values into account: each inserted value is converted +into its string representation and substitutes the placeholder with the lowest number. Since such a placeholder consists of a percent sign and a single digit there are up to ten substitutions possible.</para> |