ObjFW  Diff

Differences From Artifact [1acde59a2a]:

To Artifact [ef05512ace]:


20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
20
21
22
23
24
25
26

27
28
29
30
31
32
33
34







-
+







#import "TestsAppDelegate.h"

static OFString *module = @"OFHTTPCookieManager";

@implementation TestsAppDelegate (OFHTTPCookieManagerTests)
- (void)HTTPCookieManagerTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	void *pool = objc_autoreleasePoolPush();
	OFHTTPCookieManager *manager = [OFHTTPCookieManager manager];
	OFURL *URL[4];
	OFHTTPCookie *cookie[5];

	URL[0] = [OFURL URLWithString: @"http://heap.zone/foo"];
	URL[1] = [OFURL URLWithString: @"https://heap.zone/foo/bar"];
	URL[2] = [OFURL URLWithString: @"https://test.heap.zone/foo/bar"];
96
97
98
99
100
101
102
103

104
105
96
97
98
99
100
101
102

103
104
105







-
+


	TEST(@"-[purgeExpiredCookies]",
	    [manager.cookies isEqual:
	    [OFArray arrayWithObjects: cookie[2], cookie[3], cookie[4], nil]] &&
	    R([manager purgeExpiredCookies]) &&
	    [manager.cookies isEqual:
	    [OFArray arrayWithObjects: cookie[3], cookie[4], nil]])

	[pool drain];
	objc_autoreleasePoolPop(pool);
}
@end