Detect dual test case run
Fix #795
Prevent from calling twice the same test case. Reset the number of run tests when test_runner_setup is called. Add tests.
The error detection looks good but I don't think we should make a the ability to re-run a test case (by calling test_runner_setup a second time) a new feature. It could be something that works just because of the way our procedures and functions are designed but the proposed error message is advertising it as a feature.
I'm afraid that unorthodox use of VUnit might lead into unforeseen complexities (just as calling a test case twice did) so I rather keep the core of VUnit structure very clean. Did you have a specific use case for this in mind?
@LarsAsplund In fact I added a test that calls test_runner_setup just because it was done in a previous test like the one at line 318 (banner("Should loop over enabled_test_case once and in order unless re-initialized.");
I can remove that of course as I agree with you this might be unusual !
@std-max Ok, I understand. I can't really recall if that test was added with a feature in mind or just to make sure that test_runner_setup is well-designed. After all, it is reasonable to expect that a setup works regardless of what happened before it. Still, I wouldn't like to make it a supported feature so if you could remove that part it would be great.
Done @LarsAsplund :)
No joke, I literally fell asleep while waiting for the checks to pass You can now merge @LarsAsplund haha