laurensmiers
01536c4a67
Better handling of inline functions with declaration in header
2019-11-10 18:39:20 +01:00
laurensmiers
7a32429bd2
Add handling of treat_inline
...
- treat_externs only has effect on "extern", not "inline" anymore
- when treat_inline = :include, we remove the "inline" so that the inline functions become 'normal' functions
- they are handled as as usual and will be mocked
- Add tests to check inline functions are not deleted when treat_inline=:include (and thus mocked)
2019-11-10 18:39:20 +01:00
laurensmiers
dbb2f4964c
Add treat_inline configuration option
2019-11-10 18:39:20 +01:00
John Lindgren
2817da62db
Fix compile error when :unity_helper_path is relative.
...
Including :unity_helper_path directly doesn't work if the path is
relative and :mock_path is not the same as the working directory.
2019-11-05 15:39:32 -05:00
Mark VanderVoord
ee3ae84e64
Merge pull request #257 from art-of-dom/ret-var-name-change
...
make ret variable more unique to prevent collision with with code under test
2019-11-04 23:21:09 -05:00
Dom Postorivo
0cdc742538
make ret variable more unique to prevent collision with with code under test
2019-11-04 11:23:57 -05:00
Mark VanderVoord
c1b1ff6350
Merge pull request #255 from jlindgren90/master
...
Add documentation for :array_size_type and :array_size_name.
v2.5.0
2019-10-30 17:02:27 -04:00
John Lindgren
73afa2973b
Add documentation for :array_size_type and :array_size_name.
...
Closes #253 .
2019-10-30 16:20:47 -04:00
mvandervoord
db98427231
Verify old parsing issue is gone (see issue #195 )
2019-10-30 14:30:18 -04:00
mvandervoord
7615806e34
Address issue #196 to better deal with passing pointer types
2019-10-30 14:10:59 -04:00
Mark VanderVoord
9a0bf38c76
Merge pull request #254 from jlindgren90/master
...
Fix typo (unity_gelper -> unity_helper)
2019-10-30 12:47:40 -04:00
John Lindgren
277dc34fa1
Fix typo (unity_gelper -> unity_helper).
2019-10-30 12:45:19 -04:00
Mark VanderVoord
9327cd7af1
Merge pull request #252 from jlindgren90/master
...
Documentation fixes
2019-10-30 11:59:41 -04:00
Mark VanderVoord
71b4ec2088
Merge pull request #249 from michaelbadcrumble/meson_support
...
Upgrade Meson version too 0.52.0
2019-10-30 11:57:32 -04:00
John Lindgren
639d4120d1
Documentation fixes.
2019-10-30 11:56:43 -04:00
Mark VanderVoord
16900b4b7f
Merge pull request #251 from jlindgren90/master
...
Fix minor memory-management bugs
2019-10-30 11:54:45 -04:00
mvandervoord
14d57c2e93
Update to latest Unity
2019-10-30 10:34:37 -04:00
John Lindgren
c787042e6d
Fix off-by-one error in out-of-memory check.
...
We should be able to allocate up to CMock_Guts_MemBytesFree() minus
CMOCK_MEM_INDEX_SIZE. An incorrect less-than-or-equal prevented
allocating the very last byte.
2019-10-30 10:30:25 -04:00
John Lindgren
ea71fb0e0e
CMock_Guts_MemBytesUsed() should return 0 initially.
...
Set CMock_Guts_FreePtr to CMOCK_MEM_ALIGN_SIZE initially (the same
value it is reset to by CMock_Guts_MemFreeAll(). This makes sure
that the value returned by CMock_Guts_MemBytesUsed() is 0 initially
and not a negative value.
2019-10-30 10:22:05 -04:00
John Lindgren
74fa13f6a0
CMOCK_MEM_ALIGN should not change depending on #include order.
...
The value of CMOCK_MEM_ALIGN changed depending on whether unity.h
or cmock.h was included first. Since cmock_internals.h uses
features from unity.h, it should include unity.h.
2019-10-30 10:14:30 -04:00
mvandervoord
bb3e821eb2
Verify that void* is treated as a bytewise array comparison.
2019-10-28 07:30:51 -04:00
mvandervoord
4946aaac37
Update to latest Unity
2019-10-24 15:45:45 -04:00
mvandervoord
cda809765e
Protect again memory overruns.
...
Get rid of warnings.
2019-10-23 17:12:18 -04:00
Mark VanderVoord
8f1156dddc
latest
2019-10-23 16:38:59 -04:00
Mark VanderVoord
a210abdd12
Merge branch 'master' of https://github.com/ThrowTheSwitch/CMock
...
* 'master' of https://github.com/ThrowTheSwitch/CMock :
Fixed an error.
2019-10-23 16:37:36 -04:00
Mark VanderVoord
10e8cc27eb
Add resetTest to documentation
2019-10-23 16:36:59 -04:00
mvandervoord
b2e312e434
Fixed an error.
2019-10-23 16:03:42 -04:00
Mark VanderVoord
741b1067a3
ExpectAnyArgs should not be generated for functions with no arguments ( #201 )
2019-10-23 15:51:22 -04:00
mvandervoord
b37b3cd86b
Removing mac testing from Travis because Travis is always breaking it. *sigh*
2019-10-23 08:15:40 -04:00
Mark VanderVoord
abec576fdb
bump version of ruby run by travis
2019-10-21 11:23:39 -04:00
Mark VanderVoord
b90706424a
Switching to universal version being in the header file itself.
2019-10-21 10:13:19 -04:00
Michael Brockus
2ff29226e8
Upgrade Meson version too 0.52.0
...
Simply bumping Meson build support version 0.52.0
2019-10-12 09:22:31 -07:00
Mark VanderVoord
bc8e20e88d
Merge pull request #246 from michaelbadcrumble/meson_support
...
Add Meson support in CMock.
2019-09-26 08:50:27 -04:00
Mark VanderVoord
c5becef9fd
Merge pull request #243 from jlindgren90/expect-any-args-cleanup
...
Replace IgnoreMode with ExpectAnyArgsBool (no functional change).
2019-09-26 08:31:05 -04:00
Michael Brockus
d2c5df2f5e
Adding meson.build script at root directory.
2019-09-20 16:51:15 -07:00
Michael Brockus
0e9f8c54bc
Created sub meson.build in source directory.
2019-09-20 16:25:04 -07:00
John Lindgren
b76d570d4a
Replace IgnoreMode with ExpectAnyArgsBool (no functional change).
...
IgnoreMode was used only for the ExpectAnyArgs plugin, and the
semantics of it were backwards:
- IgnoreMode = CMOCK_ARG_NONE means to ignore all arguments
- IgnoreMode = CMOCK_ARG_ALL means to verify all arguments
ExpectAnyArgsBool should make the purpose and semantics of this
field clearer.
Additionally, ExpectAnyArgs doesn't use FinalReturn for anything.
2019-09-16 13:28:14 -04:00
Mark VanderVoord
c23c01266a
We need function prototypes to comply with strict compiler settings
2019-09-09 16:32:39 -04:00
Mark VanderVoord
e17728fe4d
Minor tweaks to overcome Ruby style warnings.
2019-09-09 14:46:14 -04:00
Mark VanderVoord
37be90bd96
Add another test for function pointers which should be ignored.
2019-09-09 11:12:27 -04:00
Mark VanderVoord
533ae7a7b1
Merge pull request #236 from jlindgren90/redundant-destroy
...
callback's mock_destroy() is redundant.
2019-09-09 11:02:06 -04:00
Mark VanderVoord
582e0f87cf
Reworked naming of the new divided callback functionality to better reflect what is happening and avoid another use of the word Ignore.
2019-09-09 11:00:09 -04:00
Mark VanderVoord
5e9264f993
Merge pull request #237 from jlindgren90/ignore-with-callback-2
...
Add CheckWithCallback and IgnoreWithCallback.
2019-09-09 10:44:54 -04:00
Mark VanderVoord
6ae662f2e8
Update documentation for clarity.
...
Grab latest Unity
2019-09-09 10:32:42 -04:00
Mark VanderVoord
e1f7c35f2e
Merge pull request #241 from jlindgren90/expect-details
...
Expect plugin should call UNITY_SET/CLR_DETAILS in pairs.
2019-09-03 11:07:03 -04:00
John Lindgren
b895a4575a
Expect plugin should call UNITY_SET/CLR_DETAILS in pairs.
...
The generated _Expect() functions called UNITY_CLR_DETAILS, which was
unnecessary because they did not call UNITY_SET_DETAIL.
The generated _Verify() functions called UNITY_SET_DETAIL but never
called UNITY_CLR_DETAILS to clean up after themselves.
2019-08-30 12:14:11 -04:00
Mark VanderVoord
e17180b2ef
Merge pull request #240 from edgarholleis/master
...
Improve comment suppression to cope with '/*xxx*//*yyy*/'.
2019-08-22 06:21:22 -04:00
Edgar J Holleis
23d2341c4c
Improve comment suppression to cope with '/*xxx*//*yyy*/'.
2019-08-22 10:58:13 +02:00
John Lindgren
5f2ae0ee0f
Update documentation
2019-07-24 13:55:04 -04:00
John Lindgren
c70cec0b19
Add CheckWithCallback and IgnoreWithCallback.
...
StubWithCallback can currently be configured to run the callback
function either before or after argument+ordering checks, based on
:callback_after_arg_check. Currently, however, you can't use both
behaviors in the same test suite; you have to pick one.
This change makes both behaviors available under two new names:
- IgnoreWithCallback, as if :callback_after_arg_check = false
- CheckWithCallback, as if :callback_after_arg_check = true
StubWithCallback simply becomes an alias (#define) for either
IgnoreWithCallback or CheckWithCallback, depending on config.
2019-07-24 13:36:41 -04:00