[Mockpp-commits] mockpp/mockpp/docs/en bookinfo.docbook,1.7,1.8 dev_advanced_jmock.docbook,1.8,1.9 f
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-07-24 12:54:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16226/mockpp/docs/en Modified Files: bookinfo.docbook dev_advanced_jmock.docbook faq.docbook Log Message: update docs Index: faq.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/faq.docbook,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- faq.docbook 17 Jun 2005 18:58:36 -0000 1.7 +++ faq.docbook 24 Jul 2005 12:54:37 -0000 1.8 @@ -38,6 +38,12 @@ } </programlisting> </para> + + <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> + </answer> </qandaentry> Index: dev_advanced_jmock.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_jmock.docbook,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- dev_advanced_jmock.docbook 27 Feb 2005 11:48:16 -0000 1.8 +++ dev_advanced_jmock.docbook 24 Jul 2005 12:54:37 -0000 1.9 @@ -170,6 +170,21 @@ <listitem><classname>IsInstanceOf</classname>/<methodname>isA()</methodname> tests if an object is of a type</listitem> </itemizedlist> +<para id="outbound">There is one special constraint which is not actually a real constraint. +<classname>OutBound</classname> does not check for incoming parameter values but +passes values back by a reference. This enables mocked methods like the following: + +<programlisting> + + void getByReference(int &ra) + { + ra = 123; + } + +</programlisting> + +</para> + <para>Creating your own constraints is quite easy. Look at the files in the <filename>constraint</filename> directory to get an idea how this can be done.</para> Index: bookinfo.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/bookinfo.docbook,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- bookinfo.docbook 30 Dec 2004 20:54:04 -0000 1.7 +++ bookinfo.docbook 24 Jul 2005 12:54:37 -0000 1.8 @@ -24,23 +24,6 @@ <holder>Ewald Arnold</holder> </copyright> -<legalnotice> -<para>This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public License -as published by the Free Software Foundation; either version 2 of -the License, or (at your option) any later version.</para> - -<para>This library 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 -Lesser General Public License for more details.</para> - -<para>You should have received a copy of the GNU Lesser General -Public License along with this library; if not, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA</para> -</legalnotice> - &release_date; &release_info; |