LoginSignup
20

More than 5 years have passed since last update.

C言語でお手軽にユニットテストを導入する.

Last updated at Posted at 2012-04-13

私が知る中では,MinUnit を超えて軽いものはない.

 /* file: minunit.h */
 #define mu_assert(message, test) do { if (!(test)) return message; } while (0)
 #define mu_run_test(test) do { char *message = test(); tests_run++; \
                                if (message) return message; } while (0)
 extern int tests_run;

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20