Closed MarkJeronimus closed 1 year ago
I am sure it works, but i am unable to understand the algorithems, the file is large, and contains a lot of stuff like generator functions.
This should be refactored into a class. it's too unweildy for a SINGLE self executiing function
This is great work @MarkJeronimus , but i am unsure as to what it does compared to the previous version, and as such, i am not sure how to test it accordingly.
@MarkJeronimus I have updated the PR to refactor it into a couple classes, i left all logic you wrote the same. If you can advice me what wads to test this new feature, i would appreicate it. thank you
@VictoriqueMoe I tested MAPINFO with chillax, and UMAPINFO with intercep2.wad. Dunno what I tested DEHACKED with but I'm sure you could find a suitable wad/
For more thorough testing, I suggest you create (or mock) a wad with several maps, but only some are named in DEHACKED, some others are named in MAPINFO and yet some others in UMAPINFO. Have some overlap and some gaps. Try with and without quotes around the name.
For UMAPINFO, the standard Allman style is tested, but the code should also be able to decode if there are less or even no returns, and missing quotes, like:
MAP MAP01 { levelname = foo bar }
@VictoriqueMoe I tested MAPINFO with chillax, and UMAPINFO with intercep2.wad. Dunno what I tested DEHACKED with but I'm sure you could find a suitable wad/
For more thorough testing, I suggest you create (or mock) a wad with several maps, but only some are named in DEHACKED, some others are named in MAPINFO and yet some others in UMAPINFO. Have some overlap and some gaps. Try with and without quotes around the name.
Yes, i want to create some Mocha unit tests for it, i think it would be easy. with wads that use MAPINFO
, UMAPINFO
and DEHACKED
Manually, i have tested MAPINFO
and DEHACKED
. i just need to test UMAPINFO
Thanks
Map lumps are parsed first, and other mapname-containing lumps may update the names.
I went all out and wrote a tokenizer/parser for UMAPINFO to prepare for any unforseen formatting issues
Disclaimer: Probably contains bugs.