mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-10-01 14:37:27 +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)
|
if (@config.ignore == :args_and_calls)
|
||||||
alias :mock_implementation_precheck :mock_implementation_for_ignores
|
alias :mock_implementation_precheck :mock_implementation_for_ignores
|
||||||
alias :mock_implementation :nothing
|
alias :mock_implementation :nothing
|
||||||
|
alias :mock_verify :mock_conditionally_verify_counts
|
||||||
else
|
else
|
||||||
alias :mock_implementation :mock_implementation_for_ignores
|
alias :mock_implementation :mock_implementation_for_ignores
|
||||||
alias :mock_implementation_precheck :nothing
|
alias :mock_implementation_precheck :nothing
|
||||||
|
alias :mock_verify :nothing
|
||||||
end
|
end
|
||||||
@utils = utils
|
@utils = utils
|
||||||
@priority = 2
|
@priority = 2
|
||||||
@@ -72,7 +74,7 @@ class CMockGeneratorPluginIgnore
|
|||||||
lines << "}\n\n"
|
lines << "}\n\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
def mock_verify(function)
|
def mock_conditionally_verify_counts(function)
|
||||||
func_name = function[:name]
|
func_name = function[:name]
|
||||||
" if (Mock.#{func_name}_IgnoreBool)\n Mock.#{func_name}_CallInstance = CMOCK_GUTS_NONE;\n"
|
" if (Mock.#{func_name}_IgnoreBool)\n Mock.#{func_name}_CallInstance = CMOCK_GUTS_NONE;\n"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -291,7 +291,7 @@
|
|||||||
TEST_ASSERT_EQUAL(13, function_d());
|
TEST_ASSERT_EQUAL(13, function_d());
|
||||||
}
|
}
|
||||||
|
|
||||||
- :pass: TRUE ############
|
- :pass: TRUE
|
||||||
:should: 'properly ignore first function but the other will work properly'
|
:should: 'properly ignore first function but the other will work properly'
|
||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
function_e();
|
function_e();
|
||||||
}
|
}
|
||||||
|
|
||||||
- :pass: FALSE ##############
|
- :pass: FALSE
|
||||||
:should: 'fail if we do not ignore a call once because we are counting calls'
|
:should: 'fail if we do not ignore a call once because we are counting calls'
|
||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
|
|||||||
Reference in New Issue
Block a user