On Thu, 2015-11-19 at 20:05 +0000, Elliot Ronaghan wrote: > Are you asking about a developer framework used to test the > implementation > or a unittest framework designed for users?
Definitely what you have labelled here as a "unit test framework", though increasingly people do not use "unit" any more as a test framework should enable unit, integration, feature, and behaviour testing. Catch is the current front runner for C++ testing. https://gi thub.com/philsquared/Catch > We don't really have a unittest framework for users, but we have an > extensive testing framework that's run nightly in hundreds of > configurations and thousands of tests to help ensure the correctness > of > our implementation. A short (mostly developer oriented) intro to our > testing framework can be see here: > I got the follow up with the URL, thanks. I will check that out. In the interim I am writing my own little assertion testing. This does raise the question though of what the behaviour of assert is when it fails. It seems to log a message and the call exit immediately, it appears to have no notion of an exception. I agree C++, Java,… exception handling is very complicated and not to be emulated, but for testing some notion of a failure report out of band of the return value of a unit is required. Go gets round this by returning a pair, the value and the error code. Very 1960s, whatever Rob Pike et al. say. Rust's approach looks superficially similar, but is not, it returns a wrapper on the return value with the type of the wrapper indicating the return code. This is akin to the functional programming approach of using Option. The upside of Go's approach is that you can write tests very easily. And they have the advantage of the user/programmer test framework being the same as the language implementor framework, almost. Mosr user/programmer people use packages over the top of the base framework to provide some needed extra features. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------
_______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
