Update for dev_tanjo3.1.10.6#1430
Conversation
|
Is it possible to update the tests too? I'd like to have them passing on this branch since it's not just a temporary branch. Feel free to message me if you run into any issues. |
|
Looks like some test coverage is missing |
|
Just to expand on the permalink encode test, I found that the tracker's zlib encodes differently than the randomizer's zlib library. However, I verified that when removing all the zlib stuff from the permalink, the encode test passes as it was previously written. But, to account for this zlib difference, I modified the encode test. If you want to test for yourself, the non-zlib-compressed permalink for default settings is |
| { | ||
| regex: /^Option "([^"]+)" Enabled$/, | ||
| value: (optionValue) => optionValue, | ||
| value: (optionValue) => !!optionValue, |
There was a problem hiding this comment.
Why is this change needed? (Could be helpful to add a comment?)
There was a problem hiding this comment.
Oh, this is a leftover patch from when some tests were failing for me previously due to the test files in the data\ folder not being updated. I'll remove them.
| }, | ||
| { | ||
| regex: /^Option "([^"]+)" Contains "([^"]+)"$/, | ||
| value: (optionValue, expectedValue) => _.get(optionValue, expectedValue), |
There was a problem hiding this comment.
Same here, why is this needed?
| test('encodes a permalink', () => { | ||
| // Python's zlib and Node's zlib produce different compressed bytes for the same uncompressed input. | ||
| // For this test permalink, I've confirmed that the uncompressed payload is byte-identical on both sides. | ||
| // So, for this test, simply check that the options are identical after an encode-decode round-trip. |
There was a problem hiding this comment.
Maybe rename the test to match the new behavior?
|
|
||
| // All rupeesanity locations have both the Rupee flag and its progression flags (Dungeon, Puzzle Secret Cave, etc.). | ||
| // So, we need special logic to distinguish between overworld and dungeon rupees. | ||
| if (_.includes(locationTypesList, Settings.FLAGS.RUPEE)) { |
There was a problem hiding this comment.
I think a way to do this that's more consistent with the existing codebase would be to update the types flag in LogicTweaks, similar to updateSunkenTriforceTypes
Code to reference:
This PR updates the
wwrando-dev-tanjo3branch of the tracker to support the new features in the dev build: