irrlicht icon indicating copy to clipboard operation
irrlicht copied to clipboard

Restore some unit tests

Open JosiahWI opened this issue 2 years ago • 6 comments

I'm ready to work on getting these tests I've restored merged in.

Closes #75 Ready for Review

JosiahWI avatar Dec 16 '21 20:12 JosiahWI

At first glance, the video driver test is useless for CI and if it is agreeable to you I will axe it. I will investigate the failing line2d test, which could've been caused by a mistake on my part. MacOS completely choked, and I don't know enough to determine why. Is this because of an issue with the way the tests are set up?

Edit: Quick note, the failing Matrix ops test on MacOS also happened on OpenBSD and I'm pretty sure this one indicates either a floating point precision problem (but most of the tests account for this) or a real bug. Edit 2: The failing matrix ops test is also my fault, and it's failing on Linux too... but it doesn't fail the test suite correctly.

JosiahWI avatar Dec 16 '21 21:12 JosiahWI

There's a lot of unnecessary media that I accidentally committed. I'll be removing that.

JosiahWI avatar Dec 16 '21 21:12 JosiahWI

Previous issue fixed by #103, thank you @paradust7.

JosiahWI avatar May 07 '22 13:05 JosiahWI

What was your strategy for readding tests? Has tests for everything been readded, except the removed stuff?

I don't particularly want to do a line-by-line review of this, I'm happy if the CI passes

rubenwardy avatar May 21 '22 17:05 rubenwardy

I pulled all the tests from the last revision that had them, and got the whole suite running with CMake/CTest. At that point I wrote the documentation in README.md for running the tests. Then I removed tests that tested code we deleted, which accounted for most of them, or those I thought looked suspiciously fragile. I refactored the test utility at the same time so it can print an error message on failure, and edited almost all the remaining tests to have more meaningful points of failure; they previously failed a whole test function at a time in some cases, with 5 or even 15 assertions per function, so I put checks after each assertion instead. I made a couple mistakes where I put a negation in the wrong place causing the test to fail, and I considered those cases to make sure I'd really put it in the wrong place before fixing it. There were 2 or 3 of those. So in summary the tests that are obsolete or require more thought have been removed and the rest mostly test core data types.

JosiahWI avatar May 22 '22 12:05 JosiahWI

I have an unadded test for the video driver that is still in my working directory to look at, because it segfaults on MacOSX. But as I don't have a Mac, chances of successfully understanding the failure may be slim. I didn't want to add a test without understanding why it fails first, because it's most likely due to code we removed or something.

JosiahWI avatar May 22 '22 12:05 JosiahWI