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

Improve serialization of xs:lists with empty elements #665

Merged
merged 6 commits into from
Oct 15, 2023

Conversation

Mingun
Copy link
Collaborator

@Mingun Mingun commented Oct 12, 2023

In this PR serialization I implement skipping unnecessary indentation or writing list delimiters, if list element was serialized to an empty string.

Also fixed minor bugs in tests for SimpleTypeDeserializer and QNameDeserializer -- I realized, that some tuple struct tests actually duplicate tuple tests.

- QNameDeserializer does not tested with tuple structs
- SimpleTypeDeserializer does not tested with tuple structs
- (stilistic) Some enum tests named "tuple_struct" [variant] instead of "tuple" [variant]
failures (3):
    se::simple_type::tests::simple_seq::all_items_empty
    se::simple_type::tests::simple_seq::some_items_empty1
    se::simple_type::tests::simple_seq::some_items_empty2
@codecov-commenter
Copy link

Codecov Report

Merging #665 (2e5af31) into master (5bed370) will increase coverage by 0.27%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master     #665      +/-   ##
==========================================
+ Coverage   64.43%   64.70%   +0.27%     
==========================================
  Files          37       37              
  Lines       17487    17624     +137     
==========================================
+ Hits        11267    11404     +137     
  Misses       6220     6220              
Flag Coverage Δ
unittests 64.70% <100.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/de/key.rs 95.17% <100.00%> (+0.02%) ⬆️
src/de/simple_type.rs 93.91% <100.00%> (+0.02%) ⬆️
src/se/content.rs 97.29% <100.00%> (ø)
src/se/element.rs 98.25% <100.00%> (ø)
src/se/mod.rs 90.61% <ø> (ø)
src/se/simple_type.rs 98.36% <100.00%> (+0.33%) ⬆️

@Mingun Mingun merged commit ea6e175 into tafia:master Oct 15, 2023
6 checks passed
@Mingun Mingun deleted the atomic branch October 15, 2023 18:13
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.

2 participants