mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
- Protect against people not defining UNITY_USE_COMMAND)LINES_ARGS but enabling cmd_lines in test runner generator. (Cherry-pick PR 739)
- Fix UNITY_NORETURN usage (Cherry-pick PR 742) - Other standards and formatting tweaks.
This commit is contained in:
@@ -402,6 +402,7 @@ class UnityTestRunnerGenerator
|
||||
end
|
||||
output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv)")
|
||||
output.puts('{')
|
||||
output.puts('#ifdef UNITY_USE_COMMAND_LINE_ARGS')
|
||||
output.puts(' int parse_status = UnityParseOptions(argc, argv);')
|
||||
output.puts(' if (parse_status != 0)')
|
||||
output.puts(' {')
|
||||
@@ -424,6 +425,7 @@ class UnityTestRunnerGenerator
|
||||
output.puts(' }')
|
||||
output.puts(' return parse_status;')
|
||||
output.puts(' }')
|
||||
output.puts('#endif')
|
||||
else
|
||||
main_return = @options[:omit_begin_end] ? 'void' : 'int'
|
||||
if main_name != 'main'
|
||||
|
||||
Reference in New Issue
Block a user