From 0278a185e44f195f95625b86254c0a6c826d6bb7 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Thu, 5 Apr 2018 22:39:57 +0200 Subject: [PATCH] squash! refactor output function to test_session_control_block --- src/kunity.c | 21 +++------------------ src/kunity.h | 11 +---------- src/kunity_t.h | 3 --- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/kunity.c b/src/kunity.c index 4a796ea..c153296 100644 --- a/src/kunity.c +++ b/src/kunity.c @@ -4,21 +4,6 @@ #include #include -//} -//{ local include region - -//} - -//{ local define region - -//} - -//{ local enum region - -//} - -//{ local typedef region - //} //{local struct region @@ -40,7 +25,7 @@ static result_code_e set_test_output(/*in */ const ptr_test_session_control_bloc //{ local var region -static test_session_control_block_s prink_output = { printk_put_char,0 ,0 }; +static test_session_control_block_s prink_output = { printk_put_char, 0, 0 }; static ptr_test_session_control_block_s kunity_output = &prink_output; @@ -89,14 +74,14 @@ result_code_e run_unity_test(/* in */ const unity_test_function_ptr test_functio return result; } - if (output->_skip_start){ + if (output->_skip_start) { Unity.TestFile = file_name; } else { UnityBegin(file_name); } UnityDefaultTestRun(test_function, test_name, line_number); - if (!output->_skip_end){ + if (!output->_skip_end) { UNITY_END(); } diff --git a/src/kunity.h b/src/kunity.h index 50e2d97..fac5567 100644 --- a/src/kunity.h +++ b/src/kunity.h @@ -3,16 +3,11 @@ #include "kunity_t.h" //{ global include region + #include -//} -//{ local include region //} -#ifdef __cplusplus -extern "C" { -#endif - //{ function region extern void putchark(/* in */ char a); @@ -25,8 +20,4 @@ extern result_code_e run_unity_printk_test(/* in */ const kunity_test_function_p //} -#ifdef __cplusplus -} -#endif - #endif // KUNITY_H diff --git a/src/kunity_t.h b/src/kunity_t.h index 9652336..d9ac7e7 100644 --- a/src/kunity_t.h +++ b/src/kunity_t.h @@ -6,9 +6,6 @@ #include #include -//} -//{ local include region - //} //{ define region