Thread: Unit test for c++

  1. #1
    Registered User
    Join Date
    Apr 2009

    Unit test for c++


    Does anyone knows an unit test framework for c++? I wll use it on linux...


  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Search the Web and try out a few until you find one that fits your requirements. At the moment, I default to UnitTest++.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    New Zealand
    I wrote my own, then after chatting with a colleague discovered that I had independently re-invented something almost exactly like some other unit test framework. Something Lite I think it was.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    I like Boost.Test a lot. But I wouldn't recommend its use without also using Boost.Build as the build system.
    All the buzzt!

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User
    Join Date
    Nov 2006
    I really fell in love with CxxTest User's Guide because it's extremely lightweight and in opposite to most other frameworks very less "overhead code" is required to create tests. It accomplishes this using perl for an own preprocessor-like system, so a perl installation is required. for windows I recommend ActivePerl

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating C/C++ Unit Test Cases
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 04-28-2009, 08:29 PM
  2. Unit test to XML file
    By ransdepm in forum Tech Board
    Replies: 9
    Last Post: 09-04-2007, 09:46 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. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  5. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM