From cc5da75730044496a660b98bdb87532d7784c43f Mon Sep 17 00:00:00 2001 From: mvandervoord Date: Thu, 3 Mar 2011 12:28:00 +0000 Subject: [PATCH] - fixed bug where final count not being properly checked for ignores as :args_only git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@210 bf332499-1b4d-0410-844d-d2d48d5cc64c --- lib/cmock_generator_plugin_ignore.rb | 4 +++- .../system/test_interactions/all_plugins_but_other_limits.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/cmock_generator_plugin_ignore.rb b/lib/cmock_generator_plugin_ignore.rb index 4429009..b9d36a0 100644 --- a/lib/cmock_generator_plugin_ignore.rb +++ b/lib/cmock_generator_plugin_ignore.rb @@ -14,9 +14,11 @@ class CMockGeneratorPluginIgnore if (@config.ignore == :args_and_calls) alias :mock_implementation_precheck :mock_implementation_for_ignores alias :mock_implementation :nothing + alias :mock_verify :mock_conditionally_verify_counts else alias :mock_implementation :mock_implementation_for_ignores alias :mock_implementation_precheck :nothing + alias :mock_verify :nothing end @utils = utils @priority = 2 @@ -72,7 +74,7 @@ class CMockGeneratorPluginIgnore lines << "}\n\n" end - def mock_verify(function) + def mock_conditionally_verify_counts(function) func_name = function[:name] " if (Mock.#{func_name}_IgnoreBool)\n Mock.#{func_name}_CallInstance = CMOCK_GUTS_NONE;\n" end diff --git a/test/system/test_interactions/all_plugins_but_other_limits.yml b/test/system/test_interactions/all_plugins_but_other_limits.yml index 6f70ea8..052f883 100644 --- a/test/system/test_interactions/all_plugins_but_other_limits.yml +++ b/test/system/test_interactions/all_plugins_but_other_limits.yml @@ -291,7 +291,7 @@ TEST_ASSERT_EQUAL(13, function_d()); } - - :pass: TRUE ############ + - :pass: TRUE :should: 'properly ignore first function but the other will work properly' :code: | test() @@ -326,7 +326,7 @@ function_e(); } - - :pass: FALSE ############## + - :pass: FALSE :should: 'fail if we do not ignore a call once because we are counting calls' :code: | test()