Hi,
The question here is which library best meets the needs of SOCI. So
apologies for helping roam off topic.
cppunit was standardised on before I joined the company where I first used
it. Also it was a company policy
not to use any of boost (for silly rather than sensible reasons that I've only
recently managed to get overturned).
We make a point of having test classes separate from the class they are testing
(e.g. class foo has a class fooTest).
Beyond that I've written very little additional boiler plate for cppunit but
that could be a function of how we write our tests.
Certainly cppunit (and cxxunit) started out copying from junit but it has
gradually evolved to fit better.
I'm very curious what features you feel are missing that make something else
like boost.test
significantly better (assuming you aren't testing gui's or try to write
multi-threaded tests for example).
I am aware of the competing school of thought that test methods should be part
of the class under test itself but
generally I prefer having a clean separation between the two.
With regard to requirements for testing. I meant that the boost.test framework
might have more facilities for testing
template meta-programming not that it did a lot of it itself (which would be
just an implementation detail anyway).
I haven't actually had cause to try boost.test as cppunit meets my current
needs and is a defacto standard where I work.
In boost I can see it from at least two sides.
1. boost needs to be tested and therefore needs a test framework - anything
outside boost could be a potentially unecessary external dependency
2. the c++ community needs a unit test framework and boost aims to be "one" if
not the "one" just as it does with other libraries.
I always assumed its main purpose was to serve boost (i.e. 1).
I wonder in that regard it how much it is like boost.build. Having seen
boost.build in operation I am reasonably impressed
but the rest of the world seems to be moving towards cmake. I haven't run
across many projects deciding to use bjam.
Regards,
Bruce.
>________________________________
> From: Vadim Zeitlin <[email protected]>
>To: SOCI general discussion list <[email protected]>
>Sent: Monday, March 25, 2013 11:41 AM
>Subject: Re: [soci-users] Using a unit testing framework?
>
>On Mon, 25 Mar 2013 11:22:39 +0000 (GMT) Bruce Adams <[email protected]>
>wrote:
>
>BA> I would highly recommend cppunit as a unit test framework (based on the
>BA> xunit framework).
>
>I have very strong feelings about cppunit and would love dearly to use
>anything else but it. The best thing I can say about it is that it's better
>than using plain assert() but that's all. I could go into the details if it
>could be useful but the TL;DR version is that cppunit slavishly copies
>xUnit approach which is perhaps good for Java but in C++ there are much,
>much better -- and less verbose -- ways to do the same thing.
>
>BA> I should imagine the requirements for the boost testing framework are a
>BA> little different from those of normal libraries as they do more
>BA> template meta-programming than most normal human beings care for.
>
>You absolutely don't need to do any template meta-programming when using
>Boost.Test. FWIW it doesn't contain much of it internally neither (unlike
>CATCH) but as a user you really don't care about it. I'm genuinely curious:
>did you use Boost.Test before standardizing on cppunit? Because if you did,
>this would make you the first person I've ever heard about who preferred
>cppunit to Boost.Test after trying them both...
>
>Regards,
>VZ
>
>------------------------------------------------------------------------------
>Everyone hates slow websites. So do we.
>Make your web apps faster with AppDynamics
>Download AppDynamics Lite for free today:
>http://p.sf.net/sfu/appdyn_d2d_mar
>_______________________________________________
>soci-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/soci-users
>
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users