Solved

creating Test suite in c++

Posted on 2013-02-06
3
410 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

770 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