|
8 | 8 | // |
9 | 9 |
|
10 | 10 |
|
11 | | - |
12 | 11 | #if DEPLOYMENT_RUNTIME_OBJC || os(Linux) |
13 | 12 | import Foundation |
14 | 13 | import XCTest |
|
21 | 20 | class TestXMLDocument : XCTestCase { |
22 | 21 |
|
23 | 22 | static var allTests: [(String, (TestXMLDocument) -> () throws -> Void)] { |
24 | | - #if os(OSX) || os(iOS) |
25 | | - return [ |
26 | | - ("test_basicCreation", test_basicCreation), |
27 | | - ("test_nextPreviousNode", test_nextPreviousNode), |
28 | | - ("test_xpath", test_xpath), |
29 | | - ("test_elementCreation", test_elementCreation), |
30 | | - ("test_elementChildren", test_elementChildren), |
31 | | - ("test_stringValue", test_stringValue), |
32 | | - ("test_objectValue", test_objectValue), |
33 | | - ("test_attributes", test_attributes), |
34 | | - ("test_comments", test_comments), |
35 | | - ("test_processingInstruction", test_processingInstruction), |
36 | | - ("test_parseXMLString", test_parseXMLString), |
37 | | - ("test_prefixes", test_prefixes), |
38 | | - // ("test_validation_success", test_validation_success), |
39 | | - // ("test_validation_failure", test_validation_failure), |
40 | | - ("test_dtd", test_dtd), |
41 | | - ("test_documentWithDTD", test_documentWithDTD), |
42 | | - ("test_dtd_attributes", test_dtd_attributes), |
43 | | - ("test_documentWithEncodingSetDoesntCrash", test_documentWithEncodingSetDoesntCrash), |
44 | | - ("test_nodeFindingWithNamespaces", test_nodeFindingWithNamespaces), |
45 | | - ("test_createElement", test_createElement), |
46 | | - ("test_addNamespace", test_addNamespace), |
47 | | - ("test_removeNamespace", test_removeNamespace), |
48 | | - ] |
49 | | - #else // On Linux, currently the tests that rely on NSError are segfaulting in swift_dynamicCast |
50 | | - return [ |
51 | | - ("test_basicCreation", test_basicCreation), |
52 | | - ("test_nextPreviousNode", test_nextPreviousNode), |
53 | | - ("test_xpath", test_xpath), |
54 | | - ("test_elementCreation", test_elementCreation), |
55 | | - ("test_elementChildren", test_elementChildren), |
56 | | - ("test_stringValue", test_stringValue), |
57 | | - ("test_objectValue", test_objectValue), |
58 | | - ("test_attributes", test_attributes), |
59 | | - ("test_comments", test_comments), |
60 | | - ("test_processingInstruction", test_processingInstruction), |
61 | | - ("test_parseXMLString", test_parseXMLString), |
62 | | - ("test_prefixes", test_prefixes), |
63 | | - // ("test_validation_success", test_validation_success), |
64 | | - // ("test_validation_failure", test_validation_failure), |
65 | | - ("test_dtd", test_dtd), |
66 | | - // ("test_documentWithDTD", test_documentWithDTD), |
67 | | - ("test_dtd_attributes", test_dtd_attributes), |
68 | | - ("test_documentWithEncodingSetDoesntCrash", test_documentWithEncodingSetDoesntCrash), |
69 | | - ("test_nodeFindingWithNamespaces", test_nodeFindingWithNamespaces), |
70 | | - ("test_createElement", test_createElement), |
71 | | - ("test_addNamespace", test_addNamespace), |
72 | | - ("test_removeNamespace", test_removeNamespace), |
73 | | - ] |
74 | | - #endif |
| 23 | + return [ |
| 24 | + ("test_basicCreation", test_basicCreation), |
| 25 | + ("test_nextPreviousNode", test_nextPreviousNode), |
| 26 | + ("test_xpath", test_xpath), |
| 27 | + ("test_elementCreation", test_elementCreation), |
| 28 | + ("test_elementChildren", test_elementChildren), |
| 29 | + ("test_stringValue", test_stringValue), |
| 30 | + ("test_objectValue", test_objectValue), |
| 31 | + ("test_attributes", test_attributes), |
| 32 | + ("test_comments", test_comments), |
| 33 | + ("test_processingInstruction", test_processingInstruction), |
| 34 | + ("test_parseXMLString", test_parseXMLString), |
| 35 | + ("test_prefixes", test_prefixes), |
| 36 | + // XFAIL: <rdar://31567922> ("test_validation_success", test_validation_success), |
| 37 | + // XFAIL: <rdar://31567922> ("test_validation_failure", test_validation_failure), |
| 38 | + ("test_dtd", test_dtd), |
| 39 | + ("test_documentWithDTD", test_documentWithDTD), |
| 40 | + ("test_dtd_attributes", test_dtd_attributes), |
| 41 | + ("test_documentWithEncodingSetDoesntCrash", test_documentWithEncodingSetDoesntCrash), |
| 42 | + ("test_nodeFindingWithNamespaces", test_nodeFindingWithNamespaces), |
| 43 | + ("test_createElement", test_createElement), |
| 44 | + ("test_addNamespace", test_addNamespace), |
| 45 | + ("test_removeNamespace", test_removeNamespace), |
| 46 | + ] |
75 | 47 | } |
76 | 48 |
|
77 | 49 | func test_basicCreation() { |
|
0 commit comments