Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
phil_nash
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
phil_nash
16y ago
Floating point comparisons are achieved through the Approx helper class. E.g: REQUIRE( pi == Approx( 3.14159265358 ) ); (and yes, I know pi to a lot more digits than that!) The style you suggest is almost supported out of the box,
2.
▲
by
phil_nash
16y ago
Arguably compilation time of your test code is even more important! You don't want to be kept waiting for feedback in a TDD cycle. I agree that compilation time can be a limiting factor of the header-only approach (actually link time may be
3.
▲
by
phil_nash
16y ago
I hear you on the compilation time. I've not yet found it to be a problem but I haven't used it at large scales yet. I'm considering support for a lib based alternative version for larger scale use (I believe boost.test has the same approac
4.
▲
by
phil_nash
16y ago
You make a good point and I have put in some workarounds for this already. I'll probably put more in over time. The trade-off is that I didn't want to over-use expression templates so I have kept it to one level. But my aim is to at least a
5.
▲
by
phil_nash
16y ago
Mocks and fakes are not directly supported, however if you are rolling your own CATCH allows test code to be called back by your application code. Although I haven't tried it yet there should be no problem using CATCH with a third-party moc