ObjFW  Diff

Differences From Artifact [bb00b9248d]:

To Artifact [4f9ae6f06a]:


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
#import <string.h>
#import <wchar.h>

#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						\
	i++;
 
const wchar_t *strings[] = {
	L"First String Object",
	L"Second String Object",
	L"Third String Object"
};







|
|
|
|
|

|
|
|
|
|

|
|
|
|
|







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
#import <string.h>
#import <wchar.h>

#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[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",
	L"Third String Object"
};