ObjFW  Diff

Differences From Artifact [cab4bb0f80]:

To Artifact [fd0d2946e0]:


12
13
14
15
16
17
18






19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#import "config.h"

#import <stdio.h>
#import <string.h>

#import "OFString.h"
#import "OFExceptions.h"







#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							\







>
>
>
>
>
>



|



|







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							\