jsalling
65e401f3de
Always run the tearDown() even if test is ignored
2016-12-24 13:56:04 -06:00
Matt Chernosky
7b51355e5a
Module generator finishes for partially existing files
...
This resolves #219 . When generating a new module, if all the files to
generate already exist then it fails as before. If some of the files
already exist, then the files that need to be created are created. Any
existing files are not changed.
Also added a bunch of tests for this feature via rspec. Run them from
the test folder with `rake spec`.
2016-12-02 13:49:07 -07:00
Matt Chernosky
37049a3a20
Fixed error when path provided with module name.
2016-11-28 23:57:17 -07:00
Mark VanderVoord
4386cf356f
Added to Module Generator:
...
- configurable case.
- better passing of includes and boilerplate information
- test only pattern
- optional naming conventions for case
2016-11-22 14:24:24 -05:00
Mark VanderVoord
4e2f0381cc
Add ability to inject correct mock prefix
2016-11-21 15:19:16 -05:00
Mark VanderVoord
ae5b4c5799
Added ability to inject defines, much like what was built into Ceedling before Ceedling switched to just using this generator.
2016-11-10 10:10:13 -05:00
Mark VanderVoord
661c1b2d56
Boost version and remove some debug puts statements
2016-10-27 23:06:18 -04:00
Mark VanderVoord
2ce8618014
refactor generate_module so that it can be called as a class from within Ceedling (much like the test runner generator)
2016-10-27 17:33:13 -04:00
L.J. Hill
bc4da247b5
Do not match strings across newlines
2016-09-21 15:10:43 -04:00
L.J. Hill
9caae856c4
Test generator: scrub strings after comments
...
This fixes #220 .
Removing strings from test files is still dangerous, but much
less likely to cause problems after this change to do the
removal after removing comments.
The bug could still manifest if a test file contains defines two
macros, one that contains a single quotation mark and then another
defined somewhere after it that contains a single quotation mark.
Everything in between the aforementioned quotation marks would
still be ignored after this commit, but that is an unlikely
scenario.
2016-09-21 14:20:29 -04:00
Mark VanderVoord
f276c79f9b
Merge branch 'feature/cmd_line_args'
2016-08-11 13:37:51 -04:00
Daniel Murdin
44c429bd8b
Escape backslashes for windows paths, fixes #137 .
...
Change-Id: I2dbae30e21ab31921817f68fd7a5e08d21c76626
2016-07-13 10:31:52 +02:00
Mark VanderVoord
f205b7de05
- If we declare main before the definition, we make sure the arguments match
2016-07-08 16:05:32 -04:00
Mark VanderVoord
eba387fa3e
- Add tests which prove command line arguments now work with runner. Fixed a few bugs in this area.
2016-06-27 08:41:58 -04:00
Mark VanderVoord
96f51e8530
Updated method of testing generate_test_runner script to be a FUNCTIONAL test instead of a perfect code match. Backfilled most tests and added some coverage not previously present. Still need to test new command line args and a few cmock details.
2016-06-22 20:57:11 -04:00
Mark VanderVoord
4d3d062b56
Adding command line support. Started with -n (test name matching) -x (test name exclusion).
...
Script verification hasn't been added yet.
2016-06-21 16:07:10 -04:00
Mark VanderVoord
b3bc196ab3
making new flush routines work under all defined conditions.
2016-06-21 10:01:34 -04:00
Mathias Giacomuzzi
87af5a1675
add unity_to_junit.py
2016-06-21 09:43:26 +02:00
Mark VanderVoord
7c3d829070
Protect against files without any test output
2016-05-18 07:31:17 -04:00
Andrzej Bieniek
61dd3f181b
Change comments style in unity and test runner to compile with std=c89
2016-05-15 14:35:50 +01:00
Mark VanderVoord
bcf6515329
Protect test runner generator against characters in strings that look like comments or functions
2016-02-25 15:35:45 -05:00
Mark VanderVoord
49e0c87841
Add output styler for junit output (Thanks Kris Boultbee)
2016-02-25 11:34:46 -05:00
Peter Mendham
099b0db22b
Updated mock determination code to be more efficient applying the
...
feedback from @mvandervoord (Thanks).
2016-02-01 22:48:23 +00:00
Peter Mendham
4ea563e65b
Added support for mocks in sub-directories.
...
This supports mock headers of the form:
#include "some/dir/MockMyCode.h"
Where the mock name is actually MockMyCode.
I *think* this is the most common scenario when working with mocks
in subdirectories but if not this could be modified to support
alternate schemes.
2016-01-28 20:45:58 +00:00
Peter Mendham
9a9d6c75cf
Removed unecessary output when generating a test runner
2016-01-27 14:42:29 +00:00
Peter Mendham
55a75ded7a
Improved header file generation.
...
Changed the guard syntax as it was cumbersome for header files in deep
sub-directories. Added framework/mock includes to make the header file
stand alone. Made sure that a valid prototype was generated in the case of
no arguments (void).
2016-01-20 13:48:15 +00:00
Peter Mendham
2e4799111c
Added a command line option to change the name of main.
...
This allows alternative entry points. This is intended for the
integration of the unit test into a larger system or for it to be used with
a platform/OS which requires an application entry point other than main. At
the moment there is no way to change the type signature.
2016-01-20 13:45:25 +00:00
Mark VanderVoord
33325f4a0b
More fixes to line endings
2016-01-07 14:20:59 -05:00
Mark VanderVoord
28195baaba
- Made some tweaks to the way the new detail handling works (to make it look nicer, mostly)
...
- Fixed a big ugly error in the fancy RUN_TEST handler
2015-12-10 18:12:45 -05:00
Mark VanderVoord
bc307bd600
properly slash paths passed to UnityBegin in test runner generator
2015-08-18 08:27:15 -04:00
Mark VanderVoord
98e8590fce
Use correct macro for unity_fixture's FAIL.
...
Output used headers from test runner generator
2015-08-18 08:03:50 -04:00
¯\_(ツ)_/¯
f72ca64b52
"usage" output to show .py ext instead of .rb
...
since this is a python port of "unity_test_summary.rb" the console usage output should say "unity_test_summary.py" instead
2015-07-27 14:24:55 +02:00
Mark VanderVoord
a7b85335be
the test runner generator now has the ability to also output a header file for the tests, which can get pulled into the test itself if desired.
2015-07-21 15:35:33 -04:00
Mark VanderVoord
ab7e322a04
protect against capturing both declaration and definitions and therefore creating a runner which runs that test twice.
2015-07-21 09:37:26 -04:00
Mark VanderVoord
e47ac34c82
Fix default path in unity test summarizer
2015-07-21 08:29:56 -04:00
Mark VanderVoord
ba87d27b77
- switch to old-school hash notation to be backwards compatible with older versions of ruby
2015-07-21 07:35:29 -04:00
Mark VanderVoord
08ffed33d4
Merge pull request #108 from eivindt/test-equal-string-len
...
New asserter: TEST_ASSERT_EQUAL_STRING_LEN
2015-06-19 13:38:10 -04:00
Mark VanderVoord
7272480c1b
Allow summarizer to search through subdirectories for results files
2015-06-19 11:48:48 -04:00
Greg Williams
b922d622a6
Added break out of system vs local includes for enhanced include-based dependency extraction to aid new cmock Make task/build generation.
...
Bumber build and version info since new external capability added for querying includes.
2015-04-06 10:44:44 -04:00
Eivind Tagseth
271f299df5
catch-all-else
2015-03-23 13:20:33 +01:00
Greg Williams
5053f2ca90
Fixed issue with requiring the new type_sanitizer module in different ways
2015-03-12 12:25:43 -04:00
Greg Williams
7fb81c8e95
Merge branch 'master' of github.com:ThrowTheSwitch/Unity
2015-03-12 10:33:33 -04:00
Greg Williams
a24bd45511
Added type_sanitizer.rb to consolidate converting a string to a valid C identifier, which will allow CMock and Ceedling to use the same construct which is currently duplicated in each repo.
2015-03-12 10:33:23 -04:00
Alexander Mueller
0f4ea8906b
Add a port of unity_test_summary.rb to Python
...
Useful in environments without access to ruby
2015-02-11 16:06:03 +01:00
Greg Williams
b953334ef3
Fixed compiler warning and added README.md
2014-11-05 21:43:47 -05:00
Mark McCrum
616dd8bd43
Fixed script unit tests. Fixed generate_test_runner configuration loading
...
- Modified rakefile to look in correct directory for script unit tests
- Updated paths in script unit tests
- Updated 'expectdata' files to match latest version of generated code
- Fixed bug which prevented generate_test_runner from loading config from
yaml file.
2014-10-29 16:10:11 +00:00
Mark VanderVoord
2fef6ea5ac
- cleaned up command-line entry of arguments
...
- made help more clear
- added ability to rename setUp / tearDown / and test prefix.
2014-10-24 22:00:05 -04:00
Mark VanderVoord
a53bb4d177
cleanup command line arguments of runner generator
2014-09-01 16:30:07 -04:00
Mark VanderVoord
14b074336b
reenable results summary.
...
support tests named spec as well.
clean up UnityBegin to make us not have to dig inside it to inject the filename.
Add UNITY_OUTPUT_START() and UNITY_OUTPUT_COMPLETE() for future use.
2014-07-30 22:12:49 -04:00
Greg Williams
a4a2eb787d
Added more robust handling of test includes, and to provide backwards API compatibility for Ceedling
2014-07-30 10:28:24 -04:00