ObjFW  Diff

Differences From Artifact [18eeb7ebbc]:

To Artifact [4a2ea7d8a4]:


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


15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22













-
+
+







/*
 * Copyright (c) 2008 - 2009
 *   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 "config.h"

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

#import "OFAutoreleasePool.h"
#import "OFDictionary.h"
#import "OFConstString.h"
#import "OFString.h"

int
31
32
33
34
35
36
37
38
39
40











41
42
32
33
34
35
36
37
38



39
40
41
42
43
44
45
46
47
48
49
50
51







-
-
-
+
+
+
+
+
+
+
+
+
+
+



	[dict set: key1
	       to: value1];
	[dict set: key2
	       to: value2];
	[pool release];

	puts([[dict get: @"key1"] cString]);
	puts([[dict get: key2] cString]);

	if (strcmp([[dict get: @"key1"] cString], "value1")) {
		puts("\033[K\033[1;31mTest 1/2 failed!\033[m");
		return 1;
	}

	if (strcmp([[dict get: key2] cString], "value2")) {
		puts("\033[K\033[1;31mTest 2/2 failed!\033[m");
		return 1;
	}

	puts("\033[1;32mTests successful: 2/2\033[0m");
	return 0;
}