mirror of
https://github.com/ThrowTheSwitch/Unity
synced 2025-04-29 22:59:34 -04:00
Do NOT include the default test runner if a custom runner has been defined.
Cleanup some style issues.
This commit is contained in:
parent
2f79302d5c
commit
c5c36ab29f
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user