/* * minunit.h * * Created on: Nov 2, 2012 * Author: attero */ #ifndef MINUNIT_H_ #define MINUNIT_H_ /** * For my small testing framework I define three macro's * Here they are: */ #define mu_assert(message, test) do { if (!(test)) return message; } while (0) #define muu_assert(message, test) do { if (!(test)) test_report += message "\n"; } while (0) #define mu_run_test(test) do { std::string message = test(); tests++;\ if (message != ""){ tests_failed++; \ test_report += "in " #test ": " + message + "\n";}\ else tests_passed++;} while (0) extern int tests_run; #endif /* MINUNIT_H_ */