Repository navigation
fix: generate canonical bools in NetworkVariable serialization tests - #4198
Open
NoelStephensUnity wants to merge 4 commits into
Open
NoelStephensUnity wants to merge 4 commits into
NoelStephensUnity wants to merge 4 commits into
Conversation
RandGenBytes<bool> filled each bool with a random byte, so most values were neither 0 nor 1. On mac arm64 IL2CPP the List<bool> and NativeHashMap<K, bool> cases then failed with both sides printing identical all-True contents. RandGenBool returns only false or true.
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-3.x.x #4198 +/- ##
==============================================
Coverage 76.03% 76.03%
==============================================
Files 159 159
Lines 27344 27344
==============================================
Hits 20791 20791
Misses 6553 6553
|
…tors With RandGenBool an overwrite keeps the existing value half the time, so when no elements were added or removed, changed2 could equal original2 and the "do not match" assertions failed. Each overwrite now redraws until it differs from the original element.
Member
Author
|
ngo |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Fixes 4
NetworkVariableTestsfailures on the mac arm64 IL2CPP nightly, whereList<bool>andNativeHashMap<K, bool>comparisons fail even though both sides print identical contents.RandGenBytes<bool>filled each bool with a random byte, so most values were neither 0 nor 1. Those printTruebut can compare unequal under IL2CPP on ARM64. The newRandGenBoolreturns onlyfalseortrue, and replaces everyRandGenBytes<bool>call site plus theNativeArray<bool>lambda from #4194, so all bool cases share one generator.Jira ticket
None.
Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Automated tests:
Covered by existing automated testsTest-only change; the mac arm64 IL2CPP nightly is the confirming run.
Up-port
Not needed; this targets develop-3.x.x.
Backports
develop-2.0.0 uses the same generator (13 call sites); a separate PR if it shows the same failure there.