ChiefOfGxBxL / WC3MapTranslator

Translate war3map ⇄ json formats for WarCraft III .w3x maps
https://www.npmjs.com/package/wc3maptranslator
MIT License
73 stars 31 forks source link

Fix failing translator reversions #19

Closed ChiefOfGxBxL closed 3 years ago

ChiefOfGxBxL commented 6 years ago

The latest build is failing because of new unit tests written to perform the following scenario:

  1. Take war3map data and translate it to JSON (warToJson)
  2. Take that JSON and translate it to war3map data (jsonToWar)
  3. Compare the bytes of both war3map files -- they should match exactly

This makes sense because both the JSON and war3map formats, although different formats, should represent the same data. And it does not matter how many times the developer switches between the two, they should restore the original data format each time.

For instance, there are small discrepancies in a .w3a file: image

This may be related to #18.

ChiefOfGxBxL commented 3 years ago

All reversion errors are fixed with Release 4.0.