This is simpler and more flexible than embedding C code in the Ruby options
(:suite_setup and :suite_teardown). However, support for :suite_setup and
:suite_teardown is kept for backwards compatibility.
Several configurations are possible:
1. :suite_setup and :suite_teardown options provided and used.
2. :suite_setup and :suite_teardown options not provided (nil):
2a. Weak symbols not supported; suiteSetUp() and suiteTearDown() are not called.
It would be simpler to make user-provided functions mandatory in this case,
but it could break some pre-existing test suites.
2b. Weak symbols are supported and the stub implementations of suiteSetUp() and
suiteTearDown() are called if there are no user-provided functions.
2c. Weak symbols are supported but overridden by user-provided suiteSetUp() and
suiteTearDown() functions.
unity.h and unity_fixture.h output their results in different string formats. This parseOutput.rb script already parsed the unity.h output to generate a JUnit-style XML summary which could be parsed by CI servers to graph the history of test pass/fail results. The changes in this commit allow the script to also handle the output format of unity_fixture.h which utilizes groups to add a layer of organization for tests.
The changes in this commit were authored by Justin Seifi, my coworker, who has approved of me submitting his work back to this open source framework repo.
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`.
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.
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.
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).
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.