Quantcast
Channel: Simple Unit Test in C - Code Review Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by alx - recommends codidact for Simple Unit Test in C

- __func____func__ exists for a reason; use it instead of const char *unit_name = #UNAME;:cmc_test_log(__func__, current_test, true, false);...printf("| Unit Test Report : %-30s|\n", __func__);-...

View Article



Answer by Toby Speight for Simple Unit Test in C

Statement-like macros should normally be wrapped in do...while(0). They should also avoid multiple expansion of arguments. So instead of#define TIMER_START(timer) \ timer.start = clock();#define...

View Article

Simple Unit Test in C

Simple UnitTest macros utility in C. I decided to make this to be able to more easily organize my tests and I emphasized on readability. Please tell me what you think and if this utility would perform...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images