ObjFW  Diff

Differences From Artifact [bb4f740fa9]:

To Artifact [b4df7e9977]:


20
21
22
23
24
25
26

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







+







#include <string.h>

#import "OFXMLParser.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidEncodingException.h"
#import "OFMalformedXMLException.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFXMLParser";
static OFXMLParser *parser;
static int i = 0;
379
380
381
382
383
384
385
386

387
388
389
390
391
392
393
394
395
396
380
381
382
383
384
385
386

387
388
389
390
391
392
393
394
395
396
397







-
+










	parser = [OFXMLParser parser];
	EXPECT_EXCEPTION(@"Detection of invalid XML processing instructions #1",
	    OFMalformedXMLException,
	    [parser parseString: @"<?xml version='2.0'?>"])

	parser = [OFXMLParser parser];
	EXPECT_EXCEPTION(@"Detection of invalid XML processing instructions #2",
	    OFMalformedXMLException,
	    OFInvalidEncodingException,
	    [parser parseString: @"<?xml encoding='UTF-7'?>"])

	parser = [OFXMLParser parser];
	EXPECT_EXCEPTION(@"Detection of invalid XML processing instructions #3",
	    OFMalformedXMLException,
	    [parser parseString: @"<x><?xml?></x>"])

	[pool drain];
}
@end