auto: Only create run_test() function if it's needed.

Also fix some whitespace consistency issues.
Use 2 newlines (not 1 or 3) before /*====Heading====*/ comments.
This commit is contained in:
John Lindgren
2019-12-12 12:53:49 -05:00
parent 5e3fb620fb
commit f39c856a37
2 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -16,13 +16,14 @@ static void run_test(UnityTestFunction func, const char* name, int line_num)
<% if @options[:plugins].include?(:cexception) %>
CEXCEPTION_T e;
Try {
<% end %>
<%= @options[:setup_name] %>();
func();
<% if @options[:plugins].include?(:cexception) %>
} Catch(e) {
TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!");
}
<% else %>
<%= @options[:setup_name] %>();
func();
<% end %>
}
if (TEST_PROTECT())