Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Give me the sample program and step by step process for unit testing in c++ for visual studio 2012
Posted
Updated 2-Dec-13 23:19pm
v2
Comments
Richard MacCutchan 3-Dec-13 5:18am    
No. Please make an effort to do your own research , rather than posting rude demands for total solutions.
chandanadhikari 3-Dec-13 6:46am    
hi,
you can start exploring here ::
http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle

1 solution

Unfortunately, unlike C#, there is no built-in support for unit tests for C++ in general (no reflection), so there is no optimal way to go about this. Instead it very much depends on what you want to achieve, with what tools, on which platform.

Check a search engine of your choice with the key words "C++ unit test". Make sure to add "native" if you meant VisualStudio native C++ (or any non-VS C++ IDE), or "managed" if you intended to use VisualStudio managed C++/CLI instead - there's a world of difference between the two!

Check the results and see what does and doesn't apply to your requirements (which btw. you failed to mention). There are tools around that help you set up unit tests, and some even provide developer forums that are more suitable for any further questions than this forum! cppunit is one such tool I recall from the top of my head - you can search for more info on this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900