Overview
Comment: | %zd doesn't work on win32. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6362f9c167307f14d03d89fa8c3139c0 |
User & Date: | js on 2008-12-22 22:30:55 |
Other Links: | manifest | tags |
Context
2008-12-22
| ||
23:17 | Add missing va_end to asprintf.c. check-in: f9202dfdaf user: js tags: trunk | |
22:30 | %zd doesn't work on win32. check-in: 6362f9c167 user: js tags: trunk | |
22:12 | Reorder libs so we can also link against static libs. check-in: 576f1baea7 user: js tags: trunk | |
Changes
Modified tests/OFList/OFList.m from [f3b973c1b4] to [f9365c3c47].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 | #import "config.h" #import <stdio.h> #import <string.h> #import "OFString.h" #import "OFList.h" #define NUM_TESTS 5 #define SUCCESS \ { \ | > > > > > > | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #import "config.h" #import <stdio.h> #import <string.h> #import "OFString.h" #import "OFList.h" #ifndef _WIN32 #define ZD "%zd" #else #define ZD "%u" #endif #define NUM_TESTS 5 #define SUCCESS \ { \ printf("\r\033[1;%dmTests successful: " ZD "/%d\033[0m", \ (i == NUM_TESTS - 1 ? 32 : 33), i + 1, NUM_TESTS); \ fflush(stdout); \ } #define FAIL \ { \ printf("\r\033[K\033[1;31mTest " ZD "/%d failed!\033[m\n", \ i + 1, NUM_TESTS); \ return 1; \ } #define CHECK(cond) \ if (cond) \ SUCCESS \ else \ |
︙ | ︙ |
Modified tests/OFString/OFString.m from [cab4bb0f80] to [fd0d2946e0].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 | #import "config.h" #import <stdio.h> #import <string.h> #import "OFString.h" #import "OFExceptions.h" #define NUM_TESTS 10 #define SUCCESS \ | > > > > > > | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #import "config.h" #import <stdio.h> #import <string.h> #import "OFString.h" #import "OFExceptions.h" #ifndef _WIN32 #define ZD "%zd" #else #define ZD "%u" #endif #define NUM_TESTS 10 #define SUCCESS \ printf("\r\033[1;%dmTests successful: " ZD "/%d\033[0m", \ (i == NUM_TESTS - 1 ? 32 : 33), i + 1, NUM_TESTS); \ fflush(stdout); #define FAIL \ printf("\r\033[K\033[1;31mTest " ZD "/%d failed!\033[m\n", \ i + 1, NUM_TESTS); \ return 1; #define CHECK(cond) \ if (cond) { \ SUCCESS \ } else { \ FAIL \ |
︙ | ︙ |
Modified tests/OFXMLFactory/OFXMLFactory.m from [308bb2e261] to [76dbf39088].
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #import <stdio.h> #import <stdlib.h> #import <string.h> #import "OFXMLFactory.h" #define NUM_TESTS 10 static size_t i; inline void check_result(char *result, const char *should) { i++; if (!strcmp(result, should)) { | > > > > > > | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #import <stdio.h> #import <stdlib.h> #import <string.h> #import "OFXMLFactory.h" #define NUM_TESTS 10 #ifndef _WIN32 #define ZD "zd" #else #define ZD "u" #endif static size_t i; inline void check_result(char *result, const char *should) { i++; if (!strcmp(result, should)) { printf("\r\033[1;%dmTests successful: %2" ZD "/%d\033[0m", (i == NUM_TESTS ? 32 : 33), i, NUM_TESTS); fflush(stdout); } else { printf("\r\033[K\033[1;31mTest %" ZD "/%d failed!\033[0m\n", i, NUM_TESTS); printf("%s is NOT expected result!\n", result); exit(1); } free(result); } |
︙ | ︙ |