zhihao gu
/
tic-tac-toe
Zhihao Gu 201189323 el18zg
tests.h
- Committer:
- el18zg
- Date:
- 2019-08-23
- Revision:
- 1:1a35154ccfaf
File content as of revision 1:1a35154ccfaf:
#ifndef TESTS_H #define TESTS_H /** *@brief run testing * *@returns failure number */ int run_test() { int m_testing_fail = 0; // fail number about test // testing printf("testing\n"); bool that_test_ok; // show the testing if (that_test_ok) { printf("pass\n"); } else { printf("fail\n"); ++m_testing_fail; // add fail times } // conclusion if (m_testing_fail > 0) { printf("%d testing fail\n", m_testing_fail); } else { printf("All pass\n"); } return m_testing_fail; } #endif