Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add parent to XMLElement #278

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

drmohundro
Copy link
Owner

@drmohundro drmohundro commented Nov 1, 2023

Initial draft for a parent property for XMLElement... to cover #277.

Sample usage from the unit test:

    func testShouldBeAbleToGetParent() {
        XCTAssertNotNil(xml!["root"]["catalog"]["book"][1]["author"].element?.parent)
        XCTAssertEqual(xml!["root"]["catalog"]["book"][1]["author"].element?.parent?.name, "book")
        XCTAssertEqual(xml!["root"]["catalog"]["book"][1]["author"].element?.parent?.attribute(by: "id")?.text, "bk102")
    }

@drmohundro drmohundro self-assigned this Nov 1, 2023
@drmohundro drmohundro force-pushed the feat/add-parent-to-xmlelement branch from 463a6f9 to 0b84d87 Compare November 1, 2023 01:16
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7226ebc) 74.06% compared to head (0b84d87) 77.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #278      +/-   ##
==========================================
+ Coverage   74.06%   77.90%   +3.84%     
==========================================
  Files          36       36              
  Lines        1997     2195     +198     
==========================================
+ Hits         1479     1710     +231     
+ Misses        518      485      -33     
Files Coverage Δ
Source/XMLAttribute.swift 100.00% <ø> (ø)
Source/XMLElement.swift 96.61% <100.00%> (+0.11%) ⬆️
Tests/SWXMLHashTests/XMLParsingTests.swift 86.18% <100.00%> (+1.94%) ⬆️

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drmohundro drmohundro force-pushed the feat/add-parent-to-xmlelement branch from 0b84d87 to 3cbf1a4 Compare September 27, 2024 19:35
chore: bump to Swift 5.9

feat: add initial parent test
@drmohundro drmohundro force-pushed the feat/add-parent-to-xmlelement branch from 3cbf1a4 to 11f89c3 Compare September 27, 2024 19:41
@drmohundro drmohundro marked this pull request as ready for review September 27, 2024 19:41
@drmohundro drmohundro merged commit 6ae7b83 into main Sep 27, 2024
38 checks passed
@drmohundro drmohundro deleted the feat/add-parent-to-xmlelement branch September 27, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant