Solved

creating Test suite in c++

Posted on 2013-02-06
3
405 Views
Last Modified: 2013-02-14
I need to create a simple Test Suite to run some test cases in C++, after googling and inspecting some open source ones i m still confused on how to create my assertions and how to output the results with failures and success rate.
I don't like to stop running tests when they fail but just output the result and continue.
Any help how to start this ?
0
Comment
Question by:bachra04
3 Comments
 
LVL 32

Expert Comment

by:phoffric
ID: 38861483
We used a variant of CPPUnit test in our project. Here's the first link when I googled "cppunit test":
   http://cppunit.sourceforge.net/doc/lastest/cppunit_cookbook.html
0
 
LVL 22

Assisted Solution

by:ambience
ambience earned 250 total points
ID: 38867012
I too use CppUnit, and for continuing even after failures you use this syntax

 CPPUT_IGNORE_FAILURE(( CPPUT_ASSERT_EQUAL( 1, 2 ) ));

This is described here: http://cppunit.sourceforge.net/cppunit2/doc/index.html#section_ignore_assertion_failure

The assertion failure is still logged
0
 
LVL 4

Accepted Solution

by:
havman56 earned 250 total points
ID: 38867511
Please google test  http://code.google.com/p/googletest/

gtest_exceptions =1 enable it

better than cppunit.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now