Revision: 150
Author:
plazt...@gmail.com
Date: Tue Apr 23 11:57:51 2013
Log: Created wiki page through web user interface.
http://code.google.com/p/mockitopp/source/detail?r=150
Added:
/wiki/CommonIssues.wiki
=======================================
--- /dev/null
+++ /wiki/CommonIssues.wiki Tue Apr 23 11:57:51 2013
@@ -0,0 +1,20 @@
+#summary Common Issues and Questions when using Mockitopp
+= Introduction =
+
+mockitopp does have a built-in limit for the maximum number of methods it
allows on a mocked class, as well as a limit on the number of arguments
allowed on a given mocked class' method(s). These are due to the fact that
mockitopp uses the m4 macro language to generate these aspects of the
framework. The number is a relatively constrained default of 100 virtual
methods and 20 arguments per method.
+
+If you know that you will be mocking pure virtual classes with more than
100 methods, or mocking methods with more than 20 arguments, you should
increase these values:
+
+
+= Increasing the maximum mockable methods and arguments =
+
+Add your content here. Format your content with:
+ * install 'scons' for your platform
+ * edit the SConstruct file in mockitopp's source directory
+ * increase the MOCKITOPP_MAX_VIRTUAL_FUNCTIONS to the number of methods
(plus some pasdding) on the largest pure virtual class you are expecting to
mock
+ * increase the MOCKITOPP_MAX_VIRTUAL_FUNCTION_ARITY to the number of
arguments (plus some padding) on the pure virtual method with the largest
number of arguments you are expecting to mock
+ * type 'scons m4'
+ * make sure you see the build output showing the execution of m4 to
regenerate dynamic_object.hpp, dynamic_vfunction.hpp, etc
+ * save/commit the mockitopp directory to your local source
repository/fork, or make this regeneration part of your build script
+
+Note that with the extra template classes and method overloads, the
compile will get a little slower. For most, it's imperceptible.