style(format): adopt --importgrouping testable-bottom from canonical rules-swift

Group @testable imports at the bottom, per public/rules-swift's swiftformat. A
behavior-preserving import-ordering reformat across 252 files (mostly tests).
--trailingclosures was deliberately not adopted (cosmetic, and swiftformat flags
it as caution-worthy).
This commit is contained in:
Mihaela Mihaljevic 2026-06-18 20:33:07 +02:00
parent c6f305357c
commit 83e6e27d12
253 changed files with 254 additions and 252 deletions

View File

@ -18,6 +18,8 @@
--wrapparameters before-first
--wrapcollections before-first
--self remove
# Adopted from canonical rules-swift: @testable imports group at the bottom.
--importgrouping testable-bottom
--exclude .build,DerivedData
# PureXML uses OpenAPIKit-style `test_...` method names with Swift Testing.

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Adversarial Critic Tests")
struct AdversarialCriticTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The worked examples of Canonical XML 1.0 section 3 (W3C Recommendation,
/// https://www.w3.org/TR/xml-c14n, W3C Software and Document License), run as

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Canonical XML 1.1: xml:base merging and xml:id")
struct CanonicalC14N11Tests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Canonical XML 2.0: sequential prefix rewrite and QName-aware values")
struct CanonicalPrefixRewriteTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Canonical XML: node-set (position-based) selection")
struct CanonicalSelectionTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Canonical XML: node-subset canonicalization and xml:* inheritance")
struct CanonicalSubsetTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Canonical XML")
struct CanonicalTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Catalog xml:base and RFC 3986 URI resolution")
struct CatalogBaseURITests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XML catalog group-level prefer override")
struct CatalogGroupPreferTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("SGML catalog format")
struct CatalogSGMLTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Catalog suffix entries and prefer attribute")
struct CatalogSuffixPreferTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XML Catalog")
struct CatalogTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Canonical XML exclusive and 2.0 mode conformance, driven through the
/// validation framework (its own suite to keep the main corpus under the cap).

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// OASIS XML Catalog conformance, driven through the validation framework
/// (Tier 2): entry kinds and the precedence the spec prescribes.

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// A first Tier-2 conformance corpus, driven through the validation framework:
/// each case runs a PureXML subsystem and the `Conformance` validation rule

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// DTD content-model conformance, driven through the validation framework (its
/// own suite to keep the main corpus under the cap).

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Serializer options-matrix conformance, driven through the validation
/// framework: each case pins the exact output of one option against the

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// HTML5 depth conformance, driven through the validation framework (#119, the
/// zone that produced #109): the spec-fidelity cases go through the document

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// XSD regex (`xs:pattern`) conformance, driven through the validation
/// framework (Tier 2): the XML Schema regex flavor against its spec semantics,

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Schematron conformance, driven through the validation framework (kept in its
/// own suite so the main corpus stays under the type-body cap).

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// XInclude and XPointer conformance, driven through the validation framework
/// (Tier 2): inclusion semantics, fallback, fragment selection, and the

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// XPath 1.0 axis and predicate conformance, driven through the validation
/// framework (its own suite to keep the main corpus under the cap).

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Locks the two content-model matchers together (#115): the DTD matcher
/// (positional set closure) and the XSD matcher (Thompson NFA) solve the same

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Unique Particle Attribution (cos-nonambig, XSD 1.0 3.8.6): a content model
/// must be deterministic, so each element in an instance is attributable to a

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Guards the content-model NFA builder against occurrence-explosion (#129).
/// The per-particle unroll cap bounds one repetition, but nested high-`maxOccurs`

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD attribute validation")
struct DTDAttributeTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD conditional sections, notations, NDATA")
struct DTDConditionalNotationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD attribute defaulting and tokenized types")
struct DTDDefaultingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The IBM-section burn-down behaviors: a document needs a root element
/// (production 1), entity references in literals must be lexical Names (P66),

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD ID and IDREF validation")
struct DTDIdentifierTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD located content-model errors")
struct DTDLocatedContentTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD parameter-entity and external-subset depth")
struct DTDParameterEntityDepthTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The standalone validity constraints (2.9) and the standalone entity WFC:
/// a document declaring standalone='yes' must not depend on declarations in

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The DTD-subset strictness landed with the OASIS/NIST conformance pass:
/// unknown or malformed markup declarations, the exact `%name;` parameter-

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD and entities")
struct DTDTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("DTD validation")
struct DTDValidationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The validity constraints added with the Sun-section burn-down: declaration-
/// level checks (reported at the document root), the root/DOCTYPE name match,

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("EXSLT functions: common, math, sets")
struct EXSLTTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Encoding-declaration contradictions are fatal (#137, 4.3.3): a declared
/// 16/32-bit encoding over 8-bit bytes, a declaration outside the BOM's

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Encoding")
struct EncodingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Per-entity base-URI tracking (#138): a relative system identifier inside
/// an external entity resolves against that entity's own URI, not the

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("External and parameter entities")
struct EntityResolverTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Content splicing (4.4.2 Included, #133): a general entity whose replacement
/// text contains markup is reparsed as content, so elements inside an entity

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The XML 1.0 errata behaviors from the eduni burn-down: 3.3.3 attribute-
/// value normalization, the lenient undeclared-entity path (production 68),

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML5 adoption agency (misnested formatting elements)")
struct HTMLAdoptionTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML5 document tree construction")
struct HTMLDocumentTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML5 foreign content (SVG/MathML namespaces)")
struct HTMLForeignContentTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML5 frameset documents")
struct HTMLFramesetTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML5 select content model")
struct HTMLSelectTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML")
struct HTMLTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML tokenizer: references, NUL, RCDATA")
struct HTMLTokenizerTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("HTML conformance validator (composable Validation rules)")
struct HTMLValidationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Line-ending normalization and XML 1.1")
struct LineEndingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The unified lint surface: one source-ranged, severity-tagged list merging
/// parse recovery and schema validation, the way an editor consumes it.

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Model")
struct ModelTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The Namespaces 1.0 constraints (#136): reserved prefixes and namespace
/// names, qualified-name shape, duplicate expanded-name attributes, NCName

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Namespaces")
struct NamespaceTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Output encoding")
struct OutputEncodingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Parity edges: C14N 2.0, catalog delegation, XPath number formatting")
struct ParityEdgeTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Parsing")
struct ParsingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Streaming patterns")
struct PatternTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Locks the pull and push tokenizers together (#115): EventReader and the
/// resumable PushScanner implement the XML token grammar twice, so the same

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Push parser")
struct PushParserTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Quick-fixes derived from the structured schema completions, with precise
/// placement from content spans. The strongest check: applying a fix yields XML

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The recovering reader (`PureXML.read`) never throws and never crashes: it
/// returns the maximal best-effort tree plus one located diagnostic per problem.

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Regex Unicode categories and class subtraction")
struct RegexCategoryTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Regex")
struct RegexTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG combine on define")
struct RelaxNGCombineTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact annotations and div grouping")
struct RelaxNGCompactAnnotationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact string concatenation")
struct RelaxNGCompactConcatTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact >> follow-annotations")
struct RelaxNGCompactFollowAnnotationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact datatype parameter blocks")
struct RelaxNGCompactParamTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact syntax and references")
struct RelaxNGCompactTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG data param facets")
struct RelaxNGDataParamTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG datatypeLibrary resolution and nsName subtraction")
struct RelaxNGDatatypeLibraryTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG located, recovering validation errors")
struct RelaxNGLocatedErrorTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG compact name-class subtraction")
struct RelaxNGNameClassTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The QName datatype's dual-context value space (#131): the schema side
/// resolves the literal against the schema's xmlns/ns scope at compile, and

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Schema-correctness validation (#131): a RELAX NG schema document must
/// itself match the RELAX NG grammar (section 3) and the restrictions of

View File

@ -1,6 +1,6 @@
import Foundation
@testable import PureXML
import Testing
@testable import PureXML
/// Opt-in runner for James Clark's RELAX NG spec test suite (`spectest.xml`,
/// distributed with jing-trang under its BSD license). Point `RNG_TS_ROOT` at

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG streaming validation")
struct RelaxNGStreamingTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG")
struct RelaxNGTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("RELAX NG typed <value> value-space comparison")
struct RelaxNGValueSpaceTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("SAX")
struct SAXTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("Save options")
struct SaveOptionsTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Scalar-level lexing (#135): a combining mark directly after an ASCII
/// delimiter must not merge with it into one grapheme cluster, so Fifth

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// An `xsi:type` may not name an abstract type: an abstract type cannot be the
/// type of an instance element (cvc-elt.4.3.2), so it is invalid as a substitution

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XSD all-group placement (cos-all-limited)")
struct SchemaAllGroupPlacementTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// A constraining facet may not be applied where a `simpleContent` restriction's base
/// chain resolves to `xs:anySimpleType`, the ur simple type, which carries no

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// The ur-type `xsd:anyType` processes its element and attribute wildcards as
/// `lax`, not `skip` (XSD 1.0 §3.4.7). A child or attribute of an untyped element

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XSD attribute default requires use=optional (src-attribute.2)")
struct SchemaAttributeDefaultUseTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// An `<xs:attribute ref="...">` resolves to a global attribute declaration,
/// taking its type from the global node and its use/default/fixed from the

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XSD attribute-use restriction (cos-ct-derived-ok)")
struct SchemaAttributeRestrictionTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XSD attribute-use uniqueness and single ID")
struct SchemaAttributeUniquenessTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// A complex type's effective `{attribute wildcard}` is the INTERSECTION of the
/// wildcards it draws from its own `anyAttribute` and from each referenced

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// A schema `blockDefault` supplies the `{disallowed substitutions}` of an element
/// and the `{prohibited substitutions}` of a complex type that state no `block` of

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
@Suite("XSD circular type derivation")
struct SchemaCircularDerivationTests {

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Cross-cutting conformance fixtures for both schema languages: realistic
/// schemas validated against valid and invalid instances.

View File

@ -1,5 +1,5 @@
@testable import PureXML
import Testing
@testable import PureXML
/// Content-model order and cardinality for the derivation contexts whose model
/// the set-membership table cannot express: a `simpleContent` derivation (facets

Some files were not shown because too many files have changed in this diff Show More