The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Mockpp - Mock Objects for C++

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
Mockpp - Mock Objects for C++ Posted: Dec 6, 2004 4:29 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Roy Osherove.
Original Post: Mockpp - Mock Objects for C++
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
Yeah, I know that what I quoted the other day about C++ is not entirely correct. You do have a mock object framework for C++. Here's a part of the documentation for Mockpp:
 

"But let me warn you

If you take the wrong macro or maybe just have a small typo you will get loads of error messages all pointing to the same line. You will have no idea where to start and search the problem. I strongly recommend to take little steps when setting up such objects: add one single method and compile. Continue only if it compiled flawlessly.

If you don't take care you will quickly find out why macros are evil and should be avoided where ever possible (unfortunately they are needed here).

It took me more than 60 hours only to get all the macro stuff working so please believe me."

 

I feel sorry for the guy. It reads like it was so painful to write a mock object framework and everything is so much more complicated that I doubt many people will get to actually use it - the learning curve is very steep (I'm trying it on for size as part of a TDD course for C++ I'm conducting - it is painful).
If a framework is hard to use, and that makes unit tests harder to write - it's hard to convince people to move to agile development, and sometimes with good cause - it might prove too much of an effort to be economically justifiable - everyone loses out.
My hope is that after a while with my course I'll be able to have some better technical knowledge about these subjects to provide a more concrete guideline I can publish online for unit testing in C++.  But, to do that, we actually have to make it work with a real product - so good luck to all of us :)
 
Currently, writing our own manual mock objects seems to be working (it's not very far from where Mockpp is these days - actually it feels less work to accomplish the same tests) but I'm not sure I fully grasp all of its concepts just yet, so I'll keep reading up more on it.

Read: Mockpp - Mock Objects for C++

Topic: Final Edits Previous Topic   Next Topic Topic: MSN Spaces Censorship

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use