Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests #376

Open
vhelin opened this issue Feb 7, 2021 · 6 comments
Open

Add more tests #376

vhelin opened this issue Feb 7, 2021 · 6 comments

Comments

@vhelin
Copy link
Owner

vhelin commented Feb 7, 2021

Currently the "examples" folder contains 57 tiny/messy projects that are used as tests. Some folders contain a "testsfile" that is used with byte_tester.exe to confirm that WLA+WLALINK have managed to output correct bytes. Not all folders contain this verification file.

  • Add more folders to examples that use random features of WLA/WLALINK
  • Add more "testsfile"s to example folders

I assume that this issue is never solved as there never can be enough tests. :)

PS. Rename that "examples" folder to "tests" and create some proper examples/project templates that people can use as starting points for their new projects...

@cr1901
Copy link
Collaborator

cr1901 commented Feb 7, 2021

@vhelin Last year I mulled on extending minunit.h for WLA DX. ctest would be fine for all the platforms supporting cmake, but I don't want the non cmake platforms to get left behind. minunit.h is extremely portable though :).

So I got sidetracked over how to create a wrapper binary for a test suite and... well, I didn't get far thanks to the pandemic derailing everything (this was April 2020) :P.

I think minunit.h and this SO answer is a good starting point to unite a test suite binary from CMake and vintage land :D.

@vhelin
Copy link
Owner Author

vhelin commented Feb 7, 2021

It'd be awesome to get the tests to run on e.g., Amiga and MSDOS! Currently they run only on platforms where /bin/sh is working... (Linux, Cygwin...)... That'd be a great leap!

Even getting the tests to work on Windows platforms would be nice. :)

@lhsazevedo
Copy link
Contributor

I think we should really focus on this. A good test suite can avoid regressions when adding a new feature or refactoring.

Unfortunately I don't know enough C and Cmake to even try to create a unit test suite and unit tests :/ And I didn't even mention Amiga and MSDOS

But I can write some feature tests though using the current runner or another runner that you setup.

@vhelin
Copy link
Owner Author

vhelin commented Feb 12, 2021

Making the tests run on Amiga / MSDOS would just require proper scripts per platform. I think the byte_tester.exe the tests use compiles just fine everywhere. I can try to take a look at how to run the tests on classic Amiga OS 2.04/3.0... And yeah, you need to make makefiles or something like them, for the tests, for Amiga / MSDOS... Not a quick thing to do.

More tests using the current runner - yes please. :) If you ask me, this should be priority one. As long as we don't have anything better this is the way to go. And if we one day get a better way of running the tests, the current tests should be included/converted as most of them are quite useful.

@Stewmath
Copy link
Contributor

We also need a way to test for things that should fail (ie. ".db 1 % % % % % % 5" currently assembles)

@vhelin
Copy link
Owner Author

vhelin commented Aug 29, 2022

Ok, 2022 update: currently we have 96 tests under /tests folder, and run_tests.sh can be run under Cygwin / Linux / Azure Pipelines (Linux and Windows OS). For Amiga OS we have run_tests.bsh that I always run before making a new release.

I assume that this issue is never solved as there never can be enough tests. :)

This is still true. And so far I've been the only one writing these tests, which means they don't really reflect the reality that much. If real WLA DX users could write these tests they'd be a magnitude more useful.

This being said I can only comment that this issue is still very relevant and open. All help (i.e. adding new tests) regarding this issue is really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants