Hi All!
I would like CMock to compare the entire string in _Expect calls, but am not having much luck. For instance:
module_put_str_Expect ("+123");
I know from experience (and the documentation) that only the first byte is being checked here, so if the expectation is called with "-123" it fails, but if it's called with "+124" the expectation passes.
I also know about the Array plugin and that is how I'm currently dealing with these situations.
module_put_str_ExpectWithArray ("+123", 5);
Now, I've read in the documentation why this happens (:when_ptr: :smart as the default), and would like to try changing this behavior, however I'm not having much luck. Setting :when_ptr: :compare_data seems to do nothing.
:cmock:
:mock_prefix: "mock_"
:callback_include_count: TRUE
:when_no_prototypes: :warn
:enforce_strict_ordering: TRUE
:when_ptr: :compare_data
:plugins:
- :ignore
- :callback
- :array
- :expect_any_args
:includes:
- compiler_defs.h
After making this change, I'm running ceedling clobber just in case, but there doesn't seem to be any change in behavior (still single byte comparison).
~/$ ceedling version
Ceedling:: 0.31.0
Unity:: 2.5.2
CMock:: 2.5.3
CException:: 1.3.3
What am I missing?
Thanks!
--David