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

Fix ordering of Scheme toplevel attrs #698

Merged

Conversation

maxwellE
Copy link
Contributor

@maxwellE maxwellE commented Jul 3, 2022

Fix for incorrect ordering of Scheme attrs when
using wasCreatedForAppExtension value

Fix for incorrect ordering of `Scheme` attrs when
using `wasCreatedForAppExtension` value
@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #698 (972db0a) into main (e651344) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #698      +/-   ##
==========================================
+ Coverage   84.93%   84.96%   +0.03%     
==========================================
  Files         157      157              
  Lines        9127     9147      +20     
==========================================
+ Hits         7752     7772      +20     
  Misses       1375     1375              
Impacted Files Coverage Δ
...urces/XcodeProj/Extensions/AEXML+XcodeFormat.swift 92.45% <ø> (ø)
...eProjTests/Extensions/AEXML+XcodeFormatTests.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e651344...972db0a. Read the comment docs.

Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @maxwellE

)
}

func test_Scheme_attributes_sorted_when_original_unsorted() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: this test may be redundant, the order in which dictionary elements are specified to my knowledge is opaque to the underlying types, the dictionaries are equal between this test and test_Scheme_attributes_sorted_when_original_sorted, as such only one of those tests will suffice.

An interesting test could be the following (but may be overkill for this)

  • Start with an unsorted raw XML (string) scheme
  • Deserialize it (read it vis XCScheme)
  • Serialize it back to XML
  • Verify the correct sort order

@luispadron
Copy link
Collaborator

@maxwellE thanks for the PR. I've merged some of them and looks like that created a conflict here. Once that's resolved we can get this merged!

@kwridan kwridan merged commit ccd78a3 into tuist:main Jul 9, 2022
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.

4 participants