4 ms·
For coordinate transforms specifically, I also like to run through the whole chain of available, implemented transforms and back again - asserting I have the sa
by henshao 2y ago
For coordinate transforms specifically, I also like to run through the whole chain of available, implemented transforms and back again - asserting I have the same coordinate at the end. One method might be wrong, but they "can't" all be wrong.
- boscillator 2y agoYah, I wrote a `f(f^-1(x)) == x` test but ended up cutting for brevity. Also, running through every possible transform seems like a pain to debug if the error is somewhere in the middle. Perhaps it would be better to test every pair using the `GENERATE` clause in catch. That way you could narrow it down to two different algorithms.
- sevensor 2y agoThis works great with property based tests especially. You can identify the parts of the domain where things blow up.