mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-07-27 14:27:50 +00:00
- 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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user