From: Piotr B. <dms...@gm...> - 2013-01-22 22:36:09
|
Hello, After evaluation of cxxtest i would like to describe my experience with hippomocks. One feature that drew my attention to the framework is the simplicity in creating mock objects. There is no need to write some boilerplate code on your own to describe the behavior of the mocked objects. Only the interface definition of the object must be made known to the framework. Check out the repository to see some example. Also, it is easy to install - it consists of just one header file - and the documentation seems to be satisfactory. Trying to demonstrates the usage of sequences (one function called after another) i came across an challenge. I got the error message "Test failed: Function called without expectation!". Although my code seems to be OK, the test case fails. After some google search I found a post with the same problem - http://www.samhartsfield.com/dokuwiki/info/cxx_libraries "I had trouble getting it to work as expected; the error messages about expectations didn't make sense enough to allow me figure it out. Specifically the message "Function called without expectation"." For now, i would go on and pick up another framework to examine. Piotr 2013/1/15 Piotr Bienkiewicz <dms...@gm...> > Hi Ulf/all, > > I've just committed a small cxxtest sample project. Check out the > repository! > > Since cxxtest doesn't supports features to test an occurrence of C++ > signals, there is an possible workaround posted by Bill Hart in cxxtest > help-forum: > "At the moment, signal handlers are not supported in CxxTest. However, > you could support this by creating a signal handler that throws an > exception that is caught by CxxTest using TS_ASSERT_ THROWS." > > In addition to the JUnit-like behavior, cxxtest provides a mechanism for > defining mock functions. Unfortunately it seems that it supports merely > mocking a global/static member functions - > https://github.com/CxxTest/cxxtest/issues/52 > > For the moment i would finish the exploration of cxxtest and go on to > evaluate another framework. > > Piotr > > 2013/1/10 Ulf Lorenz <ul...@wa...> > >> On Thu, 10 Jan 2013 00:24:55 +0100 >> Piotr Bienkiewicz <dms...@gm...> wrote: >> >> > @Ulf : I tried to attach an example program to ticket but it seems >> > not to work. I can't see the posted attachment. >> >> Mmh. I just tried and it worked for me. Did you click on post and >> everything? Can you actually post at all? >> >> There might be some problems with various source forge tools. However, >> they do also fix things rather quick, so if this problem stays, I would >> suggest to raise this issue under >> https://sourceforge.net/p/forge/site-support/ >> >> Last but not least, I do not mind if you put the test code with a >> minimalistic Makefile and/or build readme in the repository. >> >> >> Ulf >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. ON SALE this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122712 >> _______________________________________________ >> Wavepacket-ng-devel mailing list >> Wav...@li... >> https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel >> > > |