PureXML/Tests
Mihaela Mihaljevic d27e108b4d
perf(model): make the value Node tree type depth-safe (#344)
Element stored its children inline and Node was `indirect`, so a Node's
recursive layout made building, comparing, hashing, and releasing a deeply
nested tree recurse one native frame per level and overflow the stack
(signal 10) -- on a constrained stack such as a Swift Task, as shallow as a
few thousand deep.

Element now holds its children behind a copy-on-write reference
(ElementStorage), so Node is a fixed-size value (no longer indirect) and:

- `==` and `hashValue` walk the tree iteratively through explicit work
  stacks (the synthesized conformances recursed); equal trees still hash
  equally.
- ElementStorage's `deinit` flattens the subtree into a heap worklist
  before releasing, draining only storage it solely owns so a copy-on-write
  sibling keeps its subtree.
- `children` is a computed copy-on-write view with a `_modify` accessor, so
  in-place mutation (the parser's append loop) stays amortized O(1).

Value semantics are unchanged; Element/Node remain Equatable, Hashable,
Sendable. A 50000-deep tree builds, compares, hashes, and releases in a
fraction of a second; 1782 tests pass. Completes the value-Node half of #341.
2026-06-26 17:05:42 +02:00
..
Fixtures chore(test): vendor the XSTS archive (unmodified) under Tests/Fixtures (#322) 2026-06-26 09:20:37 +02:00
AdversarialCriticTests.swift
AttributeDocumentOrderTests.swift fix(xpath): cache the attribute index for document-order keys (#305) 2026-06-25 22:01:13 +02:00
ByteEncoderTests.swift test(parsing): cover ByteEncoder output-encoding paths (#320) 2026-06-26 08:27:00 +02:00
ByteFastPathTests.swift perf(parsing): byte-level scanning fast paths halve parse time vs libxml2 (#275) 2026-06-24 18:46:58 +02:00
C14NSpecExampleTests.swift
CanonicalC14N11Tests.swift
CanonicalPrefixRewriteTests.swift
CanonicalSelectionTests.swift
CanonicalSubsetTests.swift
CanonicalTests.swift
CatalogBaseURITests.swift
CatalogGroupPreferTests.swift
CatalogSGMLTests.swift
CatalogSuffixPreferTests.swift
CatalogTests.swift
ConformanceCanonicalModesTests.swift
ConformanceCatalogTests.swift
ConformanceCorpusTests.swift
ConformanceDTDTests.swift
ConformanceEmittingTests.swift
ConformanceHTMLDepthTests.swift
ConformanceRegexTests.swift
ConformanceSchematronTests.swift
ConformanceXIncludeTests.swift
ConformanceXPathAxisTests.swift
ContentMatcherDifferentialTests.swift
ContentMatcherWorstCaseTests.swift
ContentModelDeterminismTests.swift
ContentNFAStateBudgetTests.swift
CoverageGateValueTypeTests.swift
DTDAttributeTests.swift
DTDConditionalNotationTests.swift
DTDDefaultingTests.swift
DTDEntityDeclaredTests.swift
DTDIdentifierTests.swift
DTDLocatedContentTests.swift
DTDParameterEntityDepthTests.swift
DTDStandaloneTests.swift
DTDSubsetStrictnessTests.swift
DTDTests.swift
DTDValidationTests.swift
DTDValidityConstraintTests.swift
EncodingMismatchTests.swift
EncodingTests.swift
EntityBaseURITests.swift
EntityDecodeBulkTests.swift perf(parse): scan for entity-decoder markers at the byte level (#294) 2026-06-25 13:37:27 +02:00
EntityResolverTests.swift
EntitySplicingTests.swift
ErrataValidityTests.swift
EscapingBulkCopyTests.swift perf(serialize): scan bytes, not graphemes, to find characters to escape (#297) 2026-06-25 15:39:20 +02:00
EscapingFastPathTests.swift perf(emitting): skip escaping rebuild for values that need no escaping (#279) 2026-06-25 00:56:52 +02:00
EXSLTTests.swift
FirstInDocumentOrderTests.swift fix(xpath): skip the document-order key for single-node string extraction (#299) 2026-06-25 18:12:45 +02:00
FollowingPrecedingAxisTests.swift perf(xpath): fuse the node test into the following/preceding walk (#303) 2026-06-25 20:56:14 +02:00
HTMLAdoptionTests.swift
HTMLDocumentTests.swift
HTMLForeignContentTests.swift
HTMLFramesetTests.swift
HTMLSelectTests.swift
HTMLTests.swift
HTMLTokenizerTests.swift
HTMLValidationTests.swift
LineEndingTests.swift
LintTests.swift
ModelTests.swift
NamespaceConstraintTests.swift
NamespaceTests.swift
OutputEncodingTests.swift
ParityEdgeTests.swift
ParserPathDifferentialTests.swift perf(parsing): skip reference decoding for ampersand-free attribute values (#278) 2026-06-25 00:17:31 +02:00
ParseTreeDirectBuildTests.swift perf(parse): build the TreeNode tree directly from the event stream (#295) 2026-06-25 14:15:57 +02:00
ParsingTests.swift
PatternTests.swift
PullPushDifferentialTests.swift
PushParserTests.swift
QualifiedNameColonHintTests.swift perf(parse): split the name prefix from a scanned colon offset (#292) 2026-06-25 12:23:53 +02:00
QuickFixTests.swift
RecoveringReaderTests.swift
RegexCategoryTests.swift
RegexTests.swift
RelaxNGCombineTests.swift
RelaxNGCompactAnnotationTests.swift
RelaxNGCompactConcatTests.swift
RelaxNGCompactFollowAnnotationTests.swift
RelaxNGCompactParamTests.swift
RelaxNGCompactTests.swift
RelaxNGDataParamTests.swift
RelaxNGDatatypeLibraryTests.swift
RelaxNGIncludeTests.swift
RelaxNGLocatedErrorTests.swift
RelaxNGNameClassTests.swift
RelaxNGQNameTests.swift
RelaxNGSchemaCorrectnessTests.swift
RelaxNGSpecSuiteTests.swift
RelaxNGStreamingTests.swift
RelaxNGTests.swift
RelaxNGValueSpaceTests.swift
SaveOptionsTests.swift
SAXTests.swift
ScalarLexingTests.swift
SchemaAbstractXsiTypeTests.swift
SchemaAllGroupMinOccursTests.swift
SchemaAllGroupPlacementTests.swift
SchemaAllGroupReferenceTests.swift
SchemaAnySimpleTypeFacetTests.swift
SchemaAnyTypeLaxTests.swift
SchemaAttributeDefaultUseTests.swift
SchemaAttributeLocatedDiagnosticsTests.swift
SchemaAttributeRefTests.swift
SchemaAttributeRestrictionTests.swift
SchemaAttributeUniquenessTests.swift
SchemaAttributeWildcardIntersectionTests.swift
SchemaBlockDefaultTests.swift
SchemaCircularDerivationTests.swift
SchemaComposingTests.swift
SchemaCompositionLocatedDiagnosticsTests.swift
SchemaConformanceTests.swift
SchemaContainerTopLevelFormTests.swift
SchemaContentDerivationLocatedTests.swift
SchemaContentOrderTests.swift
SchemaDerivationControlTests.swift
SchemaDerivationLocatedDiagnosticsTests.swift
SchemaDeterminismGroupBlowupTests.swift
SchemaDifferentialHarness.swift
SchemaDifferentialTests.swift
SchemaDurationFacetTests.swift
SchemaElementBlockTests.swift
SchemaElementRefApplicabilityTests.swift
SchemaExtensionAllGroupTests.swift
SchemaExtensionSubstitutionLocatedTests.swift
SchemaFacetApplicabilityTests.swift
SchemaFacetDefinitionTests.swift
SchemaFixedElementChildrenTests.swift
SchemaForeignNamespaceReferenceTests.swift
SchemaFuzzTests.swift
SchemaGroupRedefineRestrictionTests.swift
SchemaIDAttributeTests.swift
SchemaIdentityDefaultValueTests.swift
SchemaIdentityFieldTypeTests.swift
SchemaIdentityScaleDuplicateTests.swift perf(schema): make xsd identity-constraint validation linear (#312) 2026-06-26 02:45:17 +02:00
SchemaIdentityValueEqualityTests.swift
SchemaIdentityXPathTests.swift
SchemaIDIDREFTests.swift
SchemaIDREFDefaultTests.swift
SchemaIDValueConstraintTests.swift
SchemaIncludeTests.swift
SchemaListFacetTests.swift
SchemaListUnionXsiTypeTests.swift
SchemaLocalElementBlockKeyTests.swift
SchemaLocatedDiagnosticsTests.swift
SchemaMixedEmptyTests.swift
SchemaMultiDocumentTests.swift
SchemaNamespacedDerivationTests.swift
SchemaNamesUPANotationLocatedTests.swift
SchemaNameUniquenessTests.swift
SchemaNestedDefinitionTests.swift
SchemaNilFixedTests.swift
SchemaNotationValidityTests.swift
SchemaParticleTypeRestrictionTests.swift
SchemaPatternFacetTests.swift
SchemaProhibitedAttributeTests.swift
SchemaQNameLengthTests.swift
SchemaRedefineAttributeGroupTests.swift
SchemaReferenceLocatedDiagnosticsTests.swift
SchemaReferenceTests.swift
SchemaRestrictionMixedTests.swift
SchemaSimpleContentChainTests.swift
SchemaSimpleContentFixedTests.swift
SchemaSimpleContentListTests.swift
SchemaSimpleContentRestrictionInlineTypeTests.swift
SchemaSimpleTypeFinalTests.swift
SchemaSimpleTypeLocatedDiagnosticsTests.swift
SchemaSimpleTypeRestrictionTests.swift
SchemaSimpleTypeVarietyTests.swift
SchemaStreamingValueConstraintTests.swift
SchemaStreamingXsiTypeGateTests.swift
SchemaStringWhitespaceTests.swift
SchemaStructureDerivationTests.swift
SchemaStructureLocatedDiagnosticsTests.swift
SchemaStructureTests.swift
SchemaSubstitutionBlockTests.swift
SchemaSubstitutionListUnionTests.swift
SchemaSubstitutionTypeBlockTests.swift
SchemaSubstitutionTypeTests.swift
SchemaTopLevelAttributeGroupTests.swift
SchemaTopLevelAttributeTests.swift
SchemaTopLevelElementTests.swift
SchemaTopLevelGroupTests.swift
SchematronAbstractPatternTests.swift
SchematronAbstractTests.swift
SchematronDiagnosticTests.swift
SchematronDynamicTests.swift
SchematronFunctionTests.swift
SchematronLetTests.swift
SchematronScopedLetTests.swift
SchematronTests.swift
SchemaTwoIDAttributesTests.swift
SchemaTypeExclusivityTests.swift
SchemaUnionFacetTests.swift
SchemaUserTypeValueConstraintTests.swift
SchemaValueConstraintExclusionTests.swift
SchemaValueConstraintTests.swift
SchemaValueConstraintValidityTests.swift
SchemaWhiteSpaceRestrictionTests.swift
SchemaWildcardNamespaceTests.swift
SchemaWildcardUnionExpressibilityTests.swift
SchemaXSIAttributeTests.swift
SchemaXSITypeUnionMemberBlockTests.swift fix(schema): block an xsi:type that reaches a union declared type through a member (#277) 2026-06-24 21:12:35 +02:00
SchemaXSTSDiagnosticTests.swift
SchemaXSTSRegressionTests.swift
SerializationEscapeTests.swift
SerializationOptionsTests.swift
SerializerTests.swift
SiblingAxisTests.swift perf(xpath): cache and fuse the following-sibling/preceding-sibling axes (#306) 2026-06-25 22:41:32 +02:00
SimpleContentAttrRestrictionTests.swift fix(schema): reject a simpleContent restriction that relaxes a required attribute (#326) 2026-06-26 11:35:33 +02:00
SourceSpanTests.swift
StreamingDecoderJPTWTests.swift
StreamingDecoderTests.swift
StreamingDTDValidationTests.swift
StreamingXSDTests.swift
StrictRecoveringDifferentialTests.swift
StrictSubsetProfileTests.swift
SubstringSearchTests.swift perf(xpath): make translate() and the substring search functions linear (#308) 2026-06-26 00:11:49 +02:00
TextReaderBreadthTests.swift
TextReaderTests.swift
TranslateFunctionTests.swift perf(xpath): make translate() and the substring search functions linear (#308) 2026-06-26 00:11:49 +02:00
TreeNodeAdoptingInitTests.swift perf(parse): adopt prepared children when materializing the tree (#293) 2026-06-25 13:02:20 +02:00
TreeNodeDepthSafetyTests.swift perf(model): make the TreeNode tree type depth-safe (#343) 2026-06-26 16:39:08 +02:00
TreeNodeEditingTests.swift
TreeNodeIdentityTests.swift
TreeNodeTests.swift
ValidationConfigurationTests.swift
ValidationFieldCoverageTests.swift
ValidationFrameworkTests.swift
ValidationRuleDTDTests.swift
ValidationRuleMiscTests.swift
ValidationRuleRegistryTests.swift
ValidationRuleStructuralTests.swift
ValidationRuleTestSupport.swift
ValidationRuleXSDTests.swift
ValidationTests.swift
ValidationWarningsTests.swift
ValueNodeDepthSafetyTests.swift perf(model): make the value Node tree type depth-safe (#344) 2026-06-26 17:05:42 +02:00
W3CEduniSuiteTests.swift
W3CIBMSuiteTests.swift
W3CJapaneseSuiteTests.swift
W3COasisSuiteTests.swift
W3CSunSuiteTests.swift
W3CXMLSuiteTests.swift
WriterTests.swift
XalanConfSuiteTests.swift
XIncludeNegotiationTests.swift
XIncludeTests.swift
XMLCharacterTests.swift
XMLDeclarationTests.swift
XPathAxisTests.swift
XPathCompiledNodeTestTests.swift perf(xpath): compile the step node test once per query (#289) 2026-06-25 09:44:04 +02:00
XPathContextTests.swift
XPathDescendantFusionTests.swift perf(xpath): fuse // into a descendant step for non-positional predicates (#281) 2026-06-25 03:21:03 +02:00
XPathExpressionTests.swift fix(xpath): format a large integer-valued number with no decimal point (#268) 2026-06-24 04:31:19 +02:00
XPathFunctionTests.swift
XPathFusedAttributeTests.swift perf(xpath): fuse the node test into the attribute traversal (#287) 2026-06-25 07:51:29 +02:00
XPathFusedDescendantTests.swift perf(xpath): fuse the node test into the descendant traversal (#286) 2026-06-25 07:05:03 +02:00
XPathNamespaceTests.swift
XPathNodeSetDedupTests.swift perf(xpath): skip node-set de-duplication where no duplicate can arise (#280) 2026-06-25 01:33:50 +02:00
XPathSingleStepOrderTests.swift perf(xpath): skip the document-order sort for an already-ordered single step (#283) 2026-06-25 05:04:00 +02:00
XPathTests.swift
XPointerRangeTests.swift perf(xpointer): linear-time string-range() search (#314) 2026-06-26 04:01:41 +02:00
XPointerTests.swift
XSDCategoryTests.swift
XSDCompletionTests2.swift
XSDComplexTypeTests.swift
XSDCompositionTests.swift
XSDDatatypeTests.swift
XSDDerivationControlTests.swift
XSDIdentityTests.swift
XSDImportTests.swift
XSDLocatedContentTests.swift
XSDNamespaceTests.swift
XSDParticleReferenceRestrictionTests.swift
XSDParticleRestrictionTests.swift
XSDRestrictionContentFreeOrderTests.swift
XSDSchemaTests.swift
XSDSchemaValidationTests.swift
XSDTypeResolutionTests.swift
XSDValueConstraintTests.swift
XSDWildcardTests.swift
XSLTApplyImportsTests.swift
XSLTAttributeSetTests.swift
XSLTCallTemplatePrecedenceTests.swift
XSLTCDATASectionTests.swift
XSLTCollationTests.swift
XSLTCompositionTests.swift
XSLTCreatedNamesTests.swift
XSLTDecimalFormatTests.swift
XSLTDoctypeOutputTests.swift
XSLTDocumentBaseURITests.swift
XSLTDocumentFunctionTests.swift
XSLTExpandedQNameTests.swift
XSLTFallbackTests.swift
XSLTFunctionTests.swift
XSLTGlobalVariableTests.swift
XSLTHTMLOutputTests.swift
XSLTKeyIdOrderTests.swift fix(xslt): make key(), id(), and EXSLT set functions linear over wide fan-outs (#300) 2026-06-25 18:45:08 +02:00
XSLTKeyNodeSetTests.swift fix(xslt): distribute // over union branches in an xsl:key match pattern (#272) 2026-06-24 15:27:36 +02:00
XSLTMatchCacheTests.swift
XSLTMessageTests.swift
XSLTNamespaceAliasTests.swift fix(xslt): xsl:namespace-alias keeps the literal prefix, remapping only the URI (closes namespace19/23/24/35/113) (#273) 2026-06-24 15:43:02 +02:00
XSLTNamespaceFixupTests.swift test(xslt): cover result-tree namespace fixup generation paths (#319) 2026-06-26 08:22:34 +02:00
XSLTNumberAnyTests.swift perf(xslt): make xsl:number level="any" quadratic, not cubic (#309) 2026-06-26 00:40:16 +02:00
XSLTNumberingTests.swift fix(xslt): count the from boundary node in xsl:number level=single when it matches count (#270) 2026-06-24 10:47:49 +02:00
XSLTNumberSingleTests.swift perf(xslt): cache xsl:number level single/multiple sibling ranks (#310) 2026-06-26 01:13:07 +02:00
XSLTOutputMethodTests.swift
XSLTParityTests.swift
XSLTParserTests.swift
XSLTPatternPriorityTests.swift
XSLTResultFragmentTests.swift
XSLTSortCaseOrderTests.swift
XSLTTests.swift
XSLTWhitespaceTests.swift fix(xslt): honor xml:space=preserve when stripping stylesheet whitespace (#271) 2026-06-24 10:57:47 +02:00
XSTSDifferentialTests.swift Revert "fix(test): bound the xmllint subprocess in the XSTS differential (#325)" (#327) 2026-06-26 11:23:08 +02:00
XSTSSuiteTests.swift fix(schema): reject a simpleContent restriction that relaxes a required attribute (#326) 2026-06-26 11:35:33 +02:00