Open ms609 opened 1 month ago
I'll need to look into most points here - but we had to change the failed build on test fail in order to compile this on mac, as I recall. This was also prefereable so every build didn't take ~30 seconds / to avoid us having to comment out the test command whilst doing development to avoid this.
You are correct in that this test could be strengthened - I shall do this shortly. On my end, if I make the test fail by changing return to false, I get the following:
Running from Qt creator, and within the software the expected fail via the GUI. In the code in the pull request, I think the test should pass - not sure if that is related to this? I've since tweaked test 18 too, and so it could be that one was failing because the test was failing.
OK, I'm now seeing consistent behaviour of the test suite; if I set a test to return false
, that test (and only that test) fails.
Test 18 is still stochastic; sometimes it passes, sometimes not.
It struck me that test five would be a stronger test if it also evaluated whether rates other than unity produced expected output. I thus tinkered (quickly) with the source as below, to see whether a rate of 2 would lead to double the change. (I'm not sure that this is necessarily a linear relationship, but it's probably a good enough approximation for these purposes.)
I saw a few things I didn't understand:
The test passed when I ran it within Qt:![image](https://github.com/palaeoware/trevosim/assets/1695515/343e6dee-83b3-43b9-a8ae-6179defb532c)
If I changed the pass conditions to guarantee a failure, test five passed, whilst test eighteen failed (?) – output below
The test failed when I built and deployed the software (which seems to contradict the assertion I think I recall seeing elsewhere that the software couldn't be built if tests were failing).