branchrust_reboot/main/tovector3_parse_format_fixcancel
10 Commits over 0 Days - Infinitycph!
Bugfix: StringView.ToVec3 - ensure we grab first-of-a-set separator
Tests: ran StringView and Command unit tests
Update: add StringView.IndexOfAny
- expanded unit test to cover
Will need it to bugfix ToVec3 again
Tests: ran unit test
Update(editor): add a couple more ToVec3
Tests: catches failing cases
Bugfix: StringView.ToVector3 - trim off both whitespaces and ,
Tests: StringView and Command unit tests pass
Update: add a couple more test cases to ToVector3 unit test
Tests: still fails, as expected
New: add Facepunch.UnityEngine.Tests assembly
- added StringView.ToVector3 unit test
Currently fails, as reported
Tests: ran unit test, fails as expected
Reduced the extra Replace alloc as suggested by Dan, added instead a fallback indexof lookup
Fixed Vector3 parsing in formats such as "10 10 10" (it's now 1:1 to the old behaviour)
https://files.facepunch.com/raul/1b0111b1/vec3_parse_test.png