ObjFW  Diff

Differences From Artifact [de1fa087bb]:

To Artifact [20f31495db]:


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
#include "config.h"

#import "OFList.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "main.h"

static OFString *module = @"OFList";
static OFString *strings[] = {
	@"Foo",
	@"Bar",
	@"Baz"
};


void
list_tests()
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFList *list;

	TEST(@"+[list]", (list = [OFList list]))

	TEST(@"-[append:]", [list append: strings[0]] &&







|








>
|
<







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
#include "config.h"

#import "OFList.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFList";
static OFString *strings[] = {
	@"Foo",
	@"Bar",
	@"Baz"
};

@implementation TestsAppDelegate (OFListTests)
- (void)listTests

{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFList *list;

	TEST(@"+[list]", (list = [OFList list]))

	TEST(@"-[append:]", [list append: strings[0]] &&
66
67
68
69
70
71
72

	    [[list first]->next->object isEqual: strings[1]] &&
	    [[list last]->object isEqual: strings[2]])

	TEST(@"-[isEqual:]", [list isEqual: [[list copy] autorelease]])

	[pool drain];
}








>
66
67
68
69
70
71
72
73
	    [[list first]->next->object isEqual: strings[1]] &&
	    [[list last]->object isEqual: strings[2]])

	TEST(@"-[isEqual:]", [list isEqual: [[list copy] autorelease]])

	[pool drain];
}
@end