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

Switch from serde_test to serde_assert. #163

Merged
merged 1 commit into from
Jan 17, 2023
Merged

Switch from serde_test to serde_assert. #163

merged 1 commit into from
Jan 17, 2023

Conversation

Anders429
Copy link
Owner

This closes #162.

I'm really happy with the improvements with this one. The biggest improvement was the significantly reduced complexity of the Allocator and Archetypes tests, both of which are testing DeserializeSeed implementations. Before, a complicated Deserialize-able newtype wrapper was required, but now we can just use the type directly. For the Allocator case, this eliminated hundreds of lines of code.

Additionally, the code now tests the full round-trip serialize and deserialize into sequences, which was not possible with serde_test.

And finally, #160 should be unblocked, due to serde_assert's Unordered, which will allow the tests to still be possible when token order is no longer guaranteed.

@Anders429 Anders429 added C - Dependencies Category: Dependencies of this library. C - Testing Category: Verifying the correctness of code. P - Low Priority: Not particularly urgent. F - serde Feature: Serialization and deserialization through the serde library. labels Jan 17, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #163 (3fb0832) into dev (e50aaed) will decrease coverage by 0.36%.
The diff coverage is 98.71%.

@@            Coverage Diff             @@
##              dev     #163      +/-   ##
==========================================
- Coverage   95.05%   94.69%   -0.37%     
==========================================
  Files          75       75              
  Lines       10708    10795      +87     
==========================================
+ Hits        10179    10222      +43     
- Misses        529      573      +44     
Impacted Files Coverage Δ
src/archetype/identifier/impl_serde.rs 98.44% <91.30%> (-1.56%) ⬇️
src/archetypes/impl_serde.rs 99.37% <95.91%> (+1.23%) ⬆️
src/entity/allocator/impl_serde.rs 98.59% <98.59%> (-0.17%) ⬇️
src/archetype/impl_serde.rs 98.15% <99.18%> (-1.67%) ⬇️
src/entity/identifier/impl_serde.rs 99.26% <100.00%> (+0.12%) ⬆️
src/hlist.rs 98.18% <100.00%> (+0.35%) ⬆️
src/world/impl_serde.rs 100.00% <100.00%> (ø)
src/registry/serde/de/sealed.rs 84.23% <0.00%> (-13.59%) ⬇️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Anders429 Anders429 merged commit 99c3fec into dev Jan 17, 2023
@Anders429 Anders429 deleted the serde_assert branch January 17, 2023 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - Dependencies Category: Dependencies of this library. C - Testing Category: Verifying the correctness of code. F - serde Feature: Serialization and deserialization through the serde library. P - Low Priority: Not particularly urgent.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants