fix github issue #126

api tests refectory with ifdef and prototypes cleaning + use of asserts. Now, if the tests fails, it will point the line error and expected behavior like this:

ERROR - tests/api.c line 715 failed with:

    test:   server_args.return_code is true

    result: server_args.return_code => FALSE
This commit is contained in:
Moisés Guimarães 2014-09-04 14:17:55 -03:00
parent ce0df18c58
commit ffd7dd3555
3 changed files with 726 additions and 972 deletions

File diff suppressed because it is too large Load Diff

View File

@ -41,10 +41,7 @@ int unit_test(int argc, char** argv)
ChangeDirBack(3);
#endif
if ( (ret = ApiTest()) != 0) {
printf("api test failed with %d\n", ret);
return ret;
}
ApiTest();
if ( (ret = HashTest()) != 0){
printf("hash test failed with %d\n", ret);

View File

@ -55,7 +55,7 @@
#define AssertStrLE(x, y) AssertStr(x, y, <=, >)
int ApiTest(void);
void ApiTest(void);
int SuiteTest(void);
int HashTest(void);