20 lines
507 B
C
20 lines
507 B
C
|
/*
|
||
|
* minunit.h
|
||
|
*
|
||
|
* Created on: Nov 2, 2012
|
||
|
* Author: attero
|
||
|
*/
|
||
|
|
||
|
#ifndef MINUNIT_H_
|
||
|
#define MINUNIT_H_
|
||
|
|
||
|
#define mu_assert(message, test) do { if (!(test)) return message; } 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_ */
|