[Mockpp-commits] mockpp/mockpp/docs/en faq.docbook,1.3,1.4 index.docbook,1.24,1.25
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-04-09 18:14:06
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18179/mockpp/docs/en Modified Files: faq.docbook index.docbook Log Message: update docs Index: faq.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/faq.docbook,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- faq.docbook 20 Nov 2004 20:32:59 -0000 1.3 +++ faq.docbook 9 Apr 2005 18:13:57 -0000 1.4 @@ -4,22 +4,59 @@ --> <chapter id="faq"> -<title>Questions and Answers</title> +<title>Frequently And Never Asked Questions</title> <qandaset id="faqlist"> - + <qandaentry> <question> + <para>I have the following simple method but it does not compile.</para> + <para> + <programlisting> + + const X& method(int p1); + </programlisting> + </para> + </question> + + <answer> + <para>Since &mockpp; emulates all method calls there is no variable to which you + can return a reference. One solution is, to use a shadow method. The trick + is to separate the mocking elements and the method in question which contains + a real variable. + + <programlisting> + + MOCKPP_VISITABLE1(ClassName, shadow_method, int); + + X shadow_variable; // the variable is a class member + + const X& method(int p1) + { + shadow_variable = shadow_method(p1); + return shadow; + } + </programlisting> + </para> + </answer> + + </qandaentry> + + <!-- --> + + <qandaentry> + + <question> <para>Where can I ask a question regarding &mockpp;?</para> </question> - + <answer> - <para>Send a mail to the according + <para>Send a mail to the according <ulink url="http://sourceforge.net/mail/?group_id=69135">mailing list</ulink> - or point your browser to the + or point your browser to the <ulink url="http://sourceforge.net/forum/?group_id=69135">forum</ulink>.</para> </answer> - + </qandaentry> </qandaset> Index: index.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/index.docbook,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- index.docbook 3 Apr 2005 12:58:25 -0000 1.24 +++ index.docbook 9 Apr 2005 18:13:57 -0000 1.25 @@ -10,8 +10,8 @@ <!ENTITY cppunit '<application>cppunit</application>' > <!ENTITY copyyears '2002-2005' > <!ENTITY mockpp_email 'mockpp at ewald-arnold dot de' > - <!ENTITY release_date '<date>2005-04-03</date>' > - <!ENTITY release_info '<releaseinfo>1.07.00</releaseinfo>' > + <!ENTITY release_date '<date>2005-04-10</date>' > + <!ENTITY release_info '<releaseinfo>1.07.01</releaseinfo>' > <!ENTITY chap_bookinfo SYSTEM 'bookinfo.docbook' > <!ENTITY chap_intro SYSTEM 'intro.docbook' > |