diff --git a/README.md b/README.md index 983f33d..e32faff 100644 --- a/README.md +++ b/README.md @@ -182,10 +182,10 @@ Memory Assertions Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like standard types... but since it's a memory compare, you have to be careful that your data types are packed. -_MESSAGE --------- +\_MESSAGE +--------- -you can append _MESSAGE to any of the macros to make them take an additional argument. This argument +you can append \_MESSAGE to any of the macros to make them take an additional argument. This argument is a string that will be printed at the end of the failure strings. This is useful for specifying more information about the problem. diff --git a/auto/generate_test_runner.rb b/auto/generate_test_runner.rb index 5053210..4944e0b 100644 --- a/auto/generate_test_runner.rb +++ b/auto/generate_test_runner.rb @@ -410,7 +410,7 @@ class UnityTestRunnerGenerator output.puts(' return suiteTearDown(UnityEnd());') end else - output.puts(' return UnityEnd();') if not @options[:omit_begin_end] + output.puts(' return UnityEnd();') unless @options[:omit_begin_end] end output.puts('}') end diff --git a/extras/fixture/rakefile_helper.rb b/extras/fixture/rakefile_helper.rb index 91c8344..4de8246 100644 --- a/extras/fixture/rakefile_helper.rb +++ b/extras/fixture/rakefile_helper.rb @@ -148,7 +148,7 @@ def run_tests load_configuration($cfg_file) test_defines = ['TEST'] $cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil? - $cfg['compiler']['defines']['items'] << "UNITY_FIXTURE_NO_EXTRAS" + $cfg['compiler']['defines']['items'] << 'UNITY_FIXTURE_NO_EXTRAS' # Get a list of all source files needed src_files = Dir["#{__dir__}/src/*.c"] diff --git a/extras/memory/rakefile_helper.rb b/extras/memory/rakefile_helper.rb index f91106f..26ce71d 100644 --- a/extras/memory/rakefile_helper.rb +++ b/extras/memory/rakefile_helper.rb @@ -146,7 +146,7 @@ def report_summary summary.run end -def run_tests(exclude_stdlib=false) +def run_tests(exclude_stdlib = false) report 'Running Unity system tests...' # Tack on TEST define for compiling unit tests diff --git a/src/unity.c b/src/unity.c index c7be02c..7b20033 100644 --- a/src/unity.c +++ b/src/unity.c @@ -1800,6 +1800,8 @@ void UnityMessage(const char* msg, const UNITY_LINE_TYPE line) } /*-----------------------------------------------*/ +/* If we have not defined our own test runner, then include our default test runner to make life easier */ +#ifndef RUN_TEST void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum) { Unity.CurrentTestName = FuncName; @@ -1819,6 +1821,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int UNITY_EXEC_TIME_STOP(); UnityConcludeTest(); } +#endif /*-----------------------------------------------*/ void UnitySetTestFile(const char* filename) diff --git a/src/unity_internals.h b/src/unity_internals.h index a9a7ea2..9f610a2 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -479,7 +479,10 @@ void UnityBegin(const char* filename); int UnityEnd(void); void UnitySetTestFile(const char* filename); void UnityConcludeTest(void); + +#ifndef RUN_TEST void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum); +#endif /*------------------------------------------------------- * Details Support diff --git a/test/rakefile b/test/rakefile index 770fead..f6cd95c 100644 --- a/test/rakefile +++ b/test/rakefile @@ -51,7 +51,12 @@ task :summary do report_summary end -desc "Build and test Unity" +namespace :test do + desc "Build and test Unity" + task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary] +end + +# Shorthand for many common tasks task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary] task :default => [:clobber, :all] task :ci => [:no_color, :default]