liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

Unit Test for validating LCF readers/writers

Open Ghabry opened this issue 7 years ago • 2 comments

As discussed in the bit perfect issues we need a regression test. This allows major refactorings without being afraid to break games :).

I don't want to bloat the repo with too many binary files, the testrunner could accept a custom directory for execution but there should be at least files of any type in the repo to have minimal test coverage.

As a generic unit test we could maybe add the following files to liblcf: (LDB, LMT, Map0001.LMU, one savegame per project).

  • 2k: Test Game 2000
  • 2k: "New Project" RPG2k Japan
  • 2ke: "New Project" RPG2k Steam
  • 2k3: Test Game 2003
  • 2k3: "New Project" RPG2k3 Japan
  • 2k3e: "New Project" RPG2k3 Steam

Ghabry avatar Oct 30 '18 09:10 Ghabry

Test data could even be in a separate repo. I wouldn't want to pollute liblcf with game data either. At a minimum what you suggest might be ok. Or even a carefully crafted minimal set of LDB,LMT,LMU,LSD that exercise all of the edge cases.

I'd also be fine with having all of the test code, scripts, directory structure infra etc.. in the repo and require people wanting to run it to get the games from some other source and just drop them in the right place to run the scripts.

A full test of liblcf is always going to require a large repo of games. But they could be just stored somewhere manually on the jenkins server for automated testing.

mateofio avatar Oct 30 '18 12:10 mateofio

...because these should be bit perfect now, we could also generate the "New Project" ones by code and do some checksum tests.

carstene1ns avatar Oct 30 '18 20:10 carstene1ns