C++ Unit Tests

This is a discussion on C++ Unit Tests within the C++ Programming forums, part of the General Programming Boards category; Hello, Anyone uses unit tests ? I never used them with c++ and I'm quite lost of what fw I ...

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    C++ Unit Tests

    Hello,

    Anyone uses unit tests ? I never used them with c++ and I'm quite lost of what fw I should use. I saw a huge list of them in:

    http://en.wikipedia.org/wiki/List_of...eworks#C.2B.2B

    and seen this test:

    http://gamesfromwithin.com/exploring...amework-jungle

    but I want to know somethings:

    1- what is the most used test unit test fw ?
    2- what is the most complete unit test fw ? I need object mock and partial object mock would be a really good thing also.
    3- in case there isn't a test fw that does unit test and object mock, what is the best/most complete/most used object mock fw ?
    4- anyone knows where I can find futher documentarion/sites/references about unit tests in c++ ?

    one requirement: got to be free software.

    Thnx,
    Nelson Teixeira

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I do not know the answers to your questions but I have used EZUnit and been pleased with the results. There are several test frameworks available on the internet and also in retail and I'm not sure if there is a best one. I think it comes down to more of what test suite suits the needs of your specific project than it comes down to a best one.

  3. #3
    C++ Junkie Mozza314's Avatar
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    174
    Quote Originally Posted by nelson777 View Post
    2- what is the most complete unit test fw ? I need object mock and partial object mock would be a really good thing also.
    I don't understand how any test framework is supposed to mock out your objects for you. Don't you need to know what's going on to mock out an object in a reasonable way? How is the framework supposed to know what the mocked out object still needs to do?

    Anyway, I recommend boost unit testing, though I haven't used any others.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help me please.
    By yann in forum C Programming
    Replies: 15
    Last Post: 09-29-2009, 10:04 PM
  2. How do you implement unit tests in cpp?
    By pheres in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2006, 04:04 AM
  3. newbie here.. pls help me in this program!
    By rothj0hn in forum C Programming
    Replies: 2
    Last Post: 02-01-2006, 10:40 PM
  4. 2-d object avoidance. Help please! (basic stuff, I think)
    By charbach007 in forum Game Programming
    Replies: 4
    Last Post: 06-15-2004, 04:49 PM
  5. Unit Actions
    By DavidP in forum Game Programming
    Replies: 20
    Last Post: 05-28-2004, 10:18 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21