Index: tests/OFList/OFList.m ================================================================== --- tests/OFList/OFList.m +++ tests/OFList/OFList.m @@ -18,27 +18,27 @@ #import "OFString.h" #import "OFList.h" #define NUM_TESTS 5 -#define SUCCESS \ -{ \ - wprintf(L"\r\033[1;%dmTests successful: %d/%d\033[0m", \ - (i == NUM_TESTS - 1 ? 32 : 33), i + 1, NUM_TESTS); \ - fflush(stdout); \ -} -#define FAIL \ -{ \ - wprintf(L"\r\033[1;31mTest %d/%d failed!\033[m\n", \ - i + 1, NUM_TESTS); \ - return 1; \ -} -#define CHECK(cond) \ - if (cond) \ - SUCCESS \ - else \ - FAIL \ +#define SUCCESS \ +{ \ + wprintf(L"\r\033[1;%dmTests successful: %d/%d\033[0m", \ + (i == NUM_TESTS - 1 ? 32 : 33), i + 1, NUM_TESTS); \ + fflush(stdout); \ +} +#define FAIL \ +{ \ + wprintf(L"\r\033[K\033[1;31mTest %d/%d failed!\033[m\n", \ + i + 1, NUM_TESTS); \ + return 1; \ +} +#define CHECK(cond) \ + if (cond) \ + SUCCESS \ + else \ + FAIL \ i++; const wchar_t *strings[] = { L"First String Object", L"Second String Object", Index: tests/OFXMLFactory/OFXMLFactory.m ================================================================== --- tests/OFXMLFactory/OFXMLFactory.m +++ tests/OFXMLFactory/OFXMLFactory.m @@ -32,11 +32,11 @@ if (!strcmp(result, should)) { wprintf(L"\r\033[1;%dmchar* tests successful: %2d/%d\033[0m", (i == NUM_TESTS ? 32 : 33), i, NUM_TESTS); fflush(stdout); } else { - wprintf(L"\r\033[1;31mchar* test %d/%d failed!\033[0m\n", + wprintf(L"\r\033[K\033[1;31mchar* test %d/%d failed!\033[0m\n", i, NUM_TESTS); wprintf(L"%s is NOT expected result!\n", result); exit(1); } @@ -51,12 +51,12 @@ if (!wcscmp(result, should)) { wprintf(L"\r\033[1;%dmwchar_t* tests successful: %2d/%d\033[0m", (i == NUM_TESTS ? 32 : 33), i, NUM_TESTS); fflush(stdout); } else { - wprintf(L"\r\033[1;31mwchar_t* test %d/%d failed!\033[0m\n", - i, NUM_TESTS); + wprintf(L"\r\033[K\033[1;31mwchar_t* test %d/%d failed!\033[0m" + "\n", i, NUM_TESTS); wprintf(L"%s is NOT expected result!\n", result); exit(1); } free(result);