5 ms·
Show HN: Doctest – C++ single-header testing framework
- je42 10y agoweird they didn't compare with clang...
- gravypod 10y agoI just gave it a test on my end. G++ and clang++ are both compiling without warning it seems. Has this been fixed?
- onqtam 10y agowhat should be fixed? You said there were no warnings...?
- onqtam 10y agono access to a linux machine - otherwise I might have tested with clang too. Also you may try the bench.py script yourself :) But this is not a benchmark of compilers but a benchmark between doctest and the other such library - and this comparison should be compiler-neutral And if on some compiler the difference is not 50 but 20 times - it would still be amazing!
- gravypod 10y agoI think this is great. The best part of this is that there has been an obvious large amount of thought put into the programmer-interface to this library. It just plain looks great. I'll have to give a try some time soon.
- RossBencina 10y agoI would like to see benchmark that compares run-time performance with Catch.
- e12e 10y agoThat, and a motivation/design-comparison with catch. From the readme, and a quick look - I couldn't really tell how this improves on catch, except for compile times (presumably mostly in the case where the lib generates main, as factoring this out is recommended for catch). [ed: catch provides both bdd and tdd forms of tests, while this doesn't help lift comments up to the level of tests, unlike its python inspiration - which is understandable, but a bit confusing, given the name.] [ed2: for an intro to catch, see eg: "CppCon 2015: Phil Nash “Test Driven C++ with Catch": https://m.youtube.com/watch?v=gdzP3pAC6UI https://m.youtube.com/watch?v=gdzP3pAC6UI ]
- optforfon 10y ago"You can just write the tests for a class or a piece of functionality at the bottom of it's source file - or even header file!" Woah.. this makes it so easy I might even use it. I'm really not a fan of TDD b/c it explodes the number of things you have to maintain - but the way this is rolled in with the documentation makes it quite appealing. Thank you so much for you work. If I start to use this regularly, I'll make sure to donate