#ifndef __TEST_H__#define __TEST_H__staticinttest_passed=0;staticinttest_failed=0;/* Terminate current test with error */#define fail() return __LINE__/* Successful end of the test case */#define done() return 0/* Check single condition */#define check(cond) \ do { \ if (!(cond)) \ fail(); \ } while (0)/* Test runner */staticvoidtest(int(*func)(void),constchar*name){intr=func();if(r==0){test_passed++;}else{test_failed++;printf("FAILED: %s (at line %d)\n",name,r);}}#endif /* __TEST_H__ */