ObjFW  Diff

Differences From Artifact [29fddc8f27]:

To Artifact [20703f949d]:


1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20
21


22
23

24
25

26
27
28
29
30
31
32
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23
24

25
26

27
28
29
30
31
32
33
34











-
+









+
+

-
+

-
+







/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import <stdio.h>
#define _ISOC99_SOURCE
#import <stdlib.h>
#import <string.h>
#import <wchar.h>

#import "OFXMLFactory.h"

inline void
check_result(char *result, const char *should)
{
	/* Use wprintf here so we don't mix printf and wprintf! */

	if (!strcmp(result, should))
		printf("%s is expected result\n", result);
		wprintf(L"%s is expected result\n", result);
	else {
		printf("%s is NOT expected result!\n", result);
		wprintf(L"%s is NOT expected result!\n", result);
		exit(1);
	}

	free(result);
}

inline void
220
221
222
223
224
225
226
227

228
229
230
231
232
233
234
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236







-
+








int main()
{
	test_escape();
       	test_create_stanza();
       	test_concat();

	puts("== Now testing with wide C strings ==");
	wprintf(L"== Now testing with wide C strings ==\n");

	test_escape_wide();
	test_create_stanza_wide();
	test_concat_wide();

	return 0;
}