diff --git a/extras/fixture/rakefile_helper.rb b/extras/fixture/rakefile_helper.rb index c30f9a2d19dc7ff9af52716013e8075e7b65f5cb..01a5d6605d4ce5716c2bc7c8c2d90654b994ee3c 100644 --- a/extras/fixture/rakefile_helper.rb +++ b/extras/fixture/rakefile_helper.rb @@ -24,11 +24,7 @@ module RakefileHelpers end def configure_clean - unless $cfg['compiler']['build_path'].nil? - CLEAN.include($cfg['compiler']['build_path'] + "*#{$cfg['compiler']['object_files']['extension']}") - CLEAN.include($cfg['compiler']['build_path'] + "*#{$cfg['linker']['bin_files']['extension']}") - CLEAN.include($cfg['compiler']['build_path'] + "*.test*") - end + CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil? end def configure_toolchain(config_file=DEFAULT_CONFIG_FILE) @@ -151,7 +147,6 @@ module RakefileHelpers # Get a list of all source files needed src_files = Dir[HERE+'src/*.c'] - src_files += Dir[HERE+'main/*.c'] src_files += Dir[HERE+'test/*.c'] src_files << '../../src/Unity.c' diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 5d56db123ec5a817d56c608219b3e2e10c30f28c..1ba3e9a57aef454c7978abd874131f03f6f4f7f9 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -116,6 +116,13 @@ void UnityTestRunner(unityfunction* setup, } } +void UnityIgnoreTest() +{ + Unity.NumberOfTests++; + Unity.CurrentTestIgnored = 1; + UNITY_OUTPUT_CHAR('!'); +} + //------------------------------------------------- //Malloc and free stuff @@ -371,3 +378,4 @@ void UnityConcludeFixtureTest() Unity.CurrentTestFailed = 0; Unity.CurrentTestIgnored = 0; } + diff --git a/extras/fixture/src/unity_fixture.h b/extras/fixture/src/unity_fixture.h index 34e62c64b78bdaec11ffdf530ceb950bd8f39263..da1f871f820afc532ff4238f8d931b5571db8a4c 100644 --- a/extras/fixture/src/unity_fixture.h +++ b/extras/fixture/src/unity_fixture.h @@ -25,24 +25,25 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)()); #define TEST(group, name) \ - void TEST_##group##_##name##_testBody();\ + void TEST_##group##_##name##_();\ void TEST_##group##_##name##_run()\ {\ UnityTestRunner(TEST_##group##_SETUP,\ - TEST_##group##_##name##_testBody,\ + TEST_##group##_##name##_,\ TEST_##group##_TEAR_DOWN,\ "TEST(" #group ", " #name ")",\ #group, #name,\ __FILE__, __LINE__);\ }\ - void TEST_##group##_##name##_testBody() + void TEST_##group##_##name##_() #define IGNORE_TEST(group, name) \ - void TEST_##group##_##name##_testBody();\ + void TEST_##group##_##name##_();\ void TEST_##group##_##name##_run()\ {\ + UnityIgnoreTest();\ }\ - void TEST_##group##_##name##_testBody() + void TEST_##group##_##name##_() #define DECLARE_TEST_CASE(group, name) \ void TEST_##group##_##name##_run() diff --git a/extras/fixture/src/unity_fixture_internals.h b/extras/fixture/src/unity_fixture_internals.h index 314ab0d02723fb84d7b36174a062ae5c438ff158..db23f67c8621c0ccf5e5cd74816d18ed1f08421a 100644 --- a/extras/fixture/src/unity_fixture_internals.h +++ b/extras/fixture/src/unity_fixture_internals.h @@ -25,6 +25,7 @@ void UnityTestRunner(unityfunction * setup, const char * name, const char * file, int line); +void UnityIgnoreTest(); void UnityMalloc_StartTest(); void UnityMalloc_EndTest(); int UnityFailureCount(); diff --git a/extras/fixture/main/AllTests.c b/extras/fixture/test/main/AllTests.c similarity index 100% rename from extras/fixture/main/AllTests.c rename to extras/fixture/test/main/AllTests.c diff --git a/extras/fixture/test/unity_fixture_Test.c b/extras/fixture/test/unity_fixture_Test.c index 2ff8a87787c65f979c8a5fd3472a4136facc805e..b8b4524cce9649fe0dde93f3639a890d8682d077 100644 --- a/extras/fixture/test/unity_fixture_Test.c +++ b/extras/fixture/test/unity_fixture_Test.c @@ -318,4 +318,4 @@ TEST(LeakDetection, BufferOverrunFoundDuringRealloc) UnityOutputCharSpy_Enable(0); CHECK(strstr(UnityOutputCharSpy_Get(), "Buffer overrun detected during realloc()")); Unity.CurrentTestFailed = 0; -} \ No newline at end of file +}