Thursday 24 October 2013

Testing yet again!

I grew tired of the polluted profiling output and performance degradation of my invariant-testing, and started looking into unit testing yet again. And I found Catch, which is pretty nice, just a bit too "much" for me. So I took my old testing framework, hotted it up with some ideas from Catch (only the expression extraction bit really) and I'm now using that with a smile on my face. Turned out the source code got even smaller, exactly 400 SLOC of C++. I already found some bugs and inconsistencies, my run-time profiling output is a lot cleaner, and the performance is where where it should be. Plus the source code is a lot nicer without all the invariant-test objects in every method.

Turns out std::thread::join() deadlocks after WinMain on Windows. Just make sure you destroy every std::thread before getting out of main (exceptions alert!).

HWM still not finished, I decided to move from Xlib to XCB and that was quite a big boring job.

Life's pretty boring overall right now. And I'm thinking too much again... It's a good thing I have friends to pull me out into real life now and then.

No comments:

Post a Comment