diff --git a/extras/fixture/rakefile_helper.rb b/extras/fixture/rakefile_helper.rb index 01a5d66..09730ef 100644 --- a/extras/fixture/rakefile_helper.rb +++ b/extras/fixture/rakefile_helper.rb @@ -87,7 +87,7 @@ module RakefileHelpers return {:command => command, :options => options, :includes => includes} end - def link(exe_name, obj_list) + def link_it(exe_name, obj_list) linker = build_linker_fields cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]} " + (obj_list.map{|obj|"#{$cfg['linker']['object_files']['path']}#{obj} "}).join + @@ -148,7 +148,8 @@ module RakefileHelpers # Get a list of all source files needed src_files = Dir[HERE+'src/*.c'] src_files += Dir[HERE+'test/*.c'] - src_files << '../../src/Unity.c' + src_files += Dir[HERE+'test/main/*.c'] + src_files << '../../src/unity.c' # Build object files src_files.each { |f| compile(f, test_defines) } @@ -156,7 +157,7 @@ module RakefileHelpers # Link the test executable test_base = "framework_test" - link(test_base, obj_list) + link_it(test_base, obj_list) # Execute unit test and generate results file simulator = build_simulator_fields diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index fa2a298..1e0aa37 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -5,9 +5,9 @@ [Released under MIT License. Please refer to license.txt for details] ========================================== */ +#include #include "unity_fixture.h" #include "unity_internals.h" -#include UNITY_FIXTURE_T UnityFixture; @@ -112,11 +112,15 @@ void UnityTestRunner(unityfunction* setup, } } -void UnityIgnoreTest() +void UnityIgnoreTest(const char * printableName) { Unity.NumberOfTests++; Unity.CurrentTestIgnored = 1; - UNITY_OUTPUT_CHAR('!'); + if (!UnityFixture.Verbose) + UNITY_OUTPUT_CHAR('!'); + else + UnityPrint(printableName); + UnityConcludeFixtureTest(); } @@ -356,6 +360,10 @@ void UnityConcludeFixtureTest() { if (Unity.CurrentTestIgnored) { + if (UnityFixture.Verbose) + { + UNITY_OUTPUT_CHAR('\n'); + } Unity.TestIgnores++; } else if (!Unity.CurrentTestFailed) @@ -374,4 +382,3 @@ 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 da1f871..43c9f7c 100644 --- a/extras/fixture/src/unity_fixture.h +++ b/extras/fixture/src/unity_fixture.h @@ -41,7 +41,7 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)()); void TEST_##group##_##name##_();\ void TEST_##group##_##name##_run()\ {\ - UnityIgnoreTest();\ + UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")");\ }\ void TEST_##group##_##name##_() diff --git a/extras/fixture/src/unity_fixture_internals.h b/extras/fixture/src/unity_fixture_internals.h index db23f67..46cbbcb 100644 --- a/extras/fixture/src/unity_fixture_internals.h +++ b/extras/fixture/src/unity_fixture_internals.h @@ -25,7 +25,7 @@ void UnityTestRunner(unityfunction * setup, const char * name, const char * file, int line); -void UnityIgnoreTest(); +void UnityIgnoreTest(const char * printableName); void UnityMalloc_StartTest(); void UnityMalloc_EndTest(); int UnityFailureCount();