Mark VanderVoord
a60383ec34
Update licenses to new standards... plus New Years bump
2025-01-01 12:05:55 -05:00
Mark VanderVoord
ecaccb428b
🪲 remove unused AbortFrame ( #316 )
2024-03-26 22:29:06 -04:00
Mark VanderVoord
e4ba3be48b
newer rubies are confused about the first array argument to some functions when the array is empty... so we name the parameters when we pass them to clear things up.
2023-02-07 08:00:51 -05:00
Mark VanderVoord
91bb49c4a8
Fix same bug as PR #354 , but as one line.
2023-01-09 14:50:56 -05:00
Yago Fontoura Do Rosario
5eebd713ba
Added extern "C" to cmock generated headers
2022-09-07 21:16:28 +02:00
Mark VanderVoord
9bb250ea4a
Update so only config is shared. Everything else about the current job is passed.
2021-02-05 15:15:14 -05:00
Mark VanderVoord
dd00b96f0d
Fix broken tests for supporting exclude_setjmp. Verify cexception won't be run when this is enabled.
2021-01-29 10:47:52 -05:00
Tuc-An
e06540f3d7
add support for mocking C++ static class member methods
2020-04-06 11:20:15 -04:00
mvandervoord
8885be7e55
Support alternative header file extension support (thanks @Tuc-an)
2020-03-18 15:08:21 -04:00
laurens
27e89dd05e
Rename treat_inline to treat_inlines
2019-11-10 18:39:35 +01:00
laurens
5ee470d7e4
Convert inline functions in header-mock to 'normal' functions
...
- normalize_source() will convert the header-to-mock.
It will look for the inline function definitions and transform them
into function declarations for non-inline functions.
2019-11-10 18:39:20 +01:00
Mark VanderVoord
0b6118e410
Merge pull request #186 from jlindgren90/master
...
mock_Verify functions should ideally not modify the state of the mock.
2019-07-07 15:12:07 -04:00
merazmus
af59c531f7
Update unit tests
2019-03-22 09:11:58 +01:00
John Lindgren
63527a3217
mock_Verify functions should ideally not modify the state of the mock.
...
In typical unit tests, this doesn't matter since the Verify functions
are called only from the end of the test. However, in longer integration
tests, where a sequence of function calls is to be tested, it's handy
to be able to verify the Expects halfway through the test. This change
is a first step in making that possible.
2018-08-28 14:51:41 -04:00
John Lindgren
488c469cdf
Fix Ruby warnings (mostly unused variables).
2017-09-14 09:40:48 -04:00
Stein Heselmans
1f87c158da
Adapt test cases to new header/footer
2017-09-14 10:43:43 +02:00
Mark VanderVoord
43fa31380d
- Renamed :strict_mock_calling option to :fail_on_unexpected_calls for clarity.
2017-09-08 14:54:55 -04:00
laurensmiers
9c9f08c48b
Add 'strict_mock_calling' option
...
- By default set to true to maintain the default behaviour of CMock
- When mocked function is called and no Except/Ignor called,
test will fail
- When set to false:
- if test calls mocked function,
and user did not specify Except/Ignore/...
test will not fail because of this,
all calls to mocked functions are ignored
2017-09-06 00:28:37 +02:00
Trond Einar Snekvik
1ffba4383c
Update test header and footer to match updated contents
2017-08-03 10:08:22 +02:00
Mark VanderVoord
2af7c7de43
Move all self-testing into a subdirectory, like we did with Unity
2017-04-07 16:27:13 -04:00
Dmitry Ledentsov
cfe52ba90f
fix the test
2016-11-28 19:34:59 +01:00
Dmitry Ledentsov
b0264f68f4
editing in the browser...
...
forgotten comma
2016-11-28 17:15:51 +01:00
Dmitry Ledentsov
d59ec41c52
fixing the test for #100
2016-11-28 17:05:27 +01:00
Mark VanderVoord
d2819592a7
Merge pull request #95 from SteinHeselmans/master
...
Add config option that allows for weak mocked functions
2016-10-27 10:16:15 -04:00
Stein Heselmans
c910393cca
More configuration options for weak symbols
2016-10-14 14:46:33 +02:00
Stein Heselmans
6c8054dc34
Add config option that allows for weak mocked functions
2016-10-14 13:43:02 +02:00
Daniel Murdin
af2226b15f
Fixed unit tests for TMS470 pragma fix.
2016-07-13 13:36:31 +02:00
Stein Heselmans
9f1ae5e2a5
fix test cases for addition of mock_suffix
2016-03-02 09:02:22 +01:00
Mark VanderVoord
3fa4de14be
-fix whitespace
2016-01-04 19:27:48 -05:00
Mark VanderVoord
cda8d3a7e1
- push the internal function and argument names into a single each per mock to further reduce const overhead.
2015-12-12 12:24:38 -05:00
Mark VanderVoord
647876644b
- Centralized error strings to a few constants.
...
- Made use of the new UNITY_SET_DETAILS feature to background set up function & argument details for messages
- CMock now takes up a lot less memory! woo!
2015-12-10 16:58:10 -05:00
Eivind Tagseth
2b89990106
Add support for subdirs (ref issue #1 )
...
New option :subdir has been added. Creating a mock for
e.g. sys/types.h using cmock_generator.rb with this option
set in config file, or more likely, command line parameter
--subdir=sys makes cmock create the files
:cmock_path/:subdir/:cmock_prefix+"types.[ch]"
The generated mock file will include the original header
file using #include <sys/types.h> as expected.
Only the generating code has been changed, the example
code with scripts for creating makefiles/creating mocks
using rake was too much work for me, and I didn't need any
of it.
2015-04-10 22:31:32 +02:00
Mark VanderVoord
d7a448b12f
Merge pull request #42 from gruzdev/pragmas
...
Add ifdef guards around GCC diagnostic pragmas (Thanks Mikhail! sorry it took me so long to get to this!)
2014-12-16 14:50:13 -05:00
Mark VanderVoord
9b91974839
- updated unit tests to use built-in minitest instead of old TestUnit and Hardmock
2014-12-16 10:04:02 -05:00
Jocelyn Le Sage
472daea243
Adjusted orig_header_include_fmt configuration item to offer a more flexible way to include the original header file.
2014-11-06 09:25:02 -05:00
Mark VanderVoord
73f6489f09
Merge pull request #37 from jlesage/orig_header_include_format
...
Added configuration item to specify how to include the original header file
2014-10-24 22:09:57 -04:00
Mikhail Gruzdev
ab382811f6
Add ifdef guards around GCC diagnostic pragmas
2014-10-20 12:25:29 +04:00
Greg Williams
e4098dba9a
Added gcc version specific fix for pragma ignores
2014-07-25 16:07:55 -04:00
Greg Williams
be7be41580
Updated to latest version of Unity.
...
Removed -Wno-duplicate-decl-specifier flag from all YAML files, since unsupported in some versions of gcc. Reimplemented ignore in specific files and generated code using a pragmas instead, which are setup to ignore undefined pragma values.
Added initial .travis.yml file for TravisCI builds.
2014-07-25 15:13:29 -04:00
Mark VanderVoord
f597ba92a9
revert cmock_line change because it was breaking on some systems
...
handle filenames with dashes and whatnot when creating header definition name
2014-07-09 09:05:48 -04:00
Jocelyn Le Sage
e3e443f274
Added configuration item to specify how to include the original header file.
...
This is useful when mocking a header file that is not local. For example, if the header file to mock is accessible from <mymodule/myfile.h>, one could set the include format to '<mymodule/%s>'.
The default format is '"%s"', which keep the previous behavior.
2014-05-23 07:28:54 -04:00
Mark VanderVoord
b9b68bd26c
- fixed broken tests introduced by Jocelyn's changes (oops. I should have checked that)
...
- reverted casting change, because it produces many pedantic C errors.
2014-05-07 15:57:08 -04:00
unknown
9e1d77a94a
- Handle filenames with spaces in them
2012-11-25 14:56:15 -05:00
unknown
27cad7c9b7
- protect against filenames with dashes for mocking
2012-11-25 14:38:26 -05:00
mvandervoord
d5b1812e2f
- updated to support calling conventions without resorting to trickery with attributes
...
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@214 bf332499-1b4d-0410-844d-d2d48d5cc64c
2011-06-07 01:32:51 +00:00
mvandervoord
1baf0de1d5
- removed leftovers of old global-order handling
...
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@208 bf332499-1b4d-0410-844d-d2d48d5cc64c
2011-01-28 19:27:13 +00:00
mvandervoord
e9a7151241
- Reworked memory handling to avoid realloc problems if it decides to relocate the block.
...
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@202 bf332499-1b4d-0410-844d-d2d48d5cc64c
2011-01-13 18:10:57 +00:00
mvandervoord
53d2c855bf
- added options to specify where include files should be placed
...
- plus and minus signs in function prototypes (like as part of the array size) no longer break
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@199 bf332499-1b4d-0410-844d-d2d48d5cc64c
2010-12-28 20:26:37 +00:00
mvandervoord
27769da9c9
- made out of order call messages more clear.
...
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@194 bf332499-1b4d-0410-844d-d2d48d5cc64c
2010-11-19 05:09:08 +00:00
mkarlesky
420b17239b
moved insertion of extra includes from mock source file generation to mock header file generation
...
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@176 bf332499-1b4d-0410-844d-d2d48d5cc64c
2010-06-28 17:17:12 +00:00