| 3 | #include "TestBase.h" |
| 4 | |
| 5 | void TEST_FOR_FAIL_FULL(const char* name, const char* str, const char* error) |
| 6 | { |
| 7 | testsCount[TEST_FAILURE_INDEX]++; |
| 8 | nullres good = nullcCompile(str); |
| 9 | if(!good) |
| 10 | { |
| 11 | char buf[4096]; |
| 12 | strncpy(buf, nullcGetLastError(), 4095); buf[4095] = 0; |
| 13 | if(strcmp(error, buf) != 0) |
| 14 | { |
| 15 | printf("Failed %s but for wrong reason:\r\n %s\r\nexpected:\r\n %s\r\n", name, buf, error); |
| 16 | }else{ |
| 17 | testsPassed[TEST_FAILURE_INDEX]++; |
| 18 | } |
| 19 | }else{ |
| 20 | printf("Test \"%s\" failed to fail.\r\n", name); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | |
| 25 | void RunCompileFailTests() |
no test coverage detected