Hello, Guest the thread was called251 times and contains 2 replays

last post from ubik at the

BASIC10/BASIC65 test suite

  • Hi all,

    here is a (small but growing) BASIC65 test suite:


    Bit Shifter & me are currently using this to find & narrow down bugs in the BASIC65 interpreter. It would greatly benefit from more tests covering more of BASIC65's various aspects.

    So, if you're feeling like adding some tests, the suite is easy to extend. Simply save a test routine with the filename T@@@-TESTNAME (where "@@@" is a three-digit decimal number) onto the test disc and make sure that your test routine ends with DLOAD "RUNNER" (or breaks in case of an error or unexpected result). If in doubt, have a look at the existing tests for examples.

    To run the test suite, simply BOOT the disc. Tests are being run in the order of their numeric ID.

    If you have written any cool (or boring ;)) new tests, feel free to send them to me, so that I can add them to the disc image.

  • If it runs through. ;) It‘s a simple kind of unit testing, so the screenshot above is a bad result =O

    When you see --- TESTS COMPLETED. --- at the end, everything is ok. Like so:

    If it breaks before that, there‘s a bug. In your case, the DS$(x) bug (you can DIM and use DS(), you can DIM DS$(), but you can't actually use DS$(x), it always has the contents of DS$... this was incidentally fixed by BitShifter a few weeks ago and then cropped up again later and is now fixed again ;))

    You can type LIST to see the failed test, RUN to repeat it, or rename it (e.g. RENAME "T095-RESNAMES1“ TO "X095-RESNAMES1") to disable it. The tests are (and should be) quite simple. They're written in a way that they STOP when an unexpected result is discovered, thus breaking the chain of tests that the RUNNER program is executing.

    I thought about displaying the elapsed time at the end but decided against it, your benchmarks are much better for that. This is only for testing and seeing if there are regressions.