Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

creating Test suite in c++

Posted on 2013-02-06
3
Medium Priority
?
453 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 750 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 750 total points
ID: 38867511
Please google test  http://code.google.com/p/googletest/

gtest_exceptions =1 enable it

better than cppunit.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 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…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

885 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