Go Back   AnandTech Forums > Software > Programming

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals
· Free Stuff
· Contests and Sweepstakes
· Black Friday 2013
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 12-17-2012, 06:18 PM   #1
IHateMyJob2004
Lifer
 
IHateMyJob2004's Avatar
 
Join Date: Sep 2004
Posts: 15,822
Default De Facto standard unit testing framework for C/C++?

Is there a defacto standard unit test framework for C/C++?

Something liek JUnit for Java?
__________________
Look at the Blackberry Z10 with an open mind. It is actually good!
FREE MUSIC - via torrent:
http://bt.etree.org/
or just download some free music:
http://www.archive.org/audio/etree-band-showall.php 100% LEGIT!
IHateMyJob2004 is offline   Reply With Quote
Old 12-17-2012, 06:58 PM   #2
Crusty
Lifer
 
Crusty's Avatar
 
Join Date: Sep 2001
Location: ATX
Posts: 12,305
Default

We use the Boost test suite for all our unit testing needs at work. There's also cppunit, but I haven't used that since college.
__________________
Consequences will never be the same!

/^1?$|^(11+?)\1+$/
Crusty is offline   Reply With Quote
Old 12-28-2012, 12:15 PM   #3
beyonddc
Senior Member
 
Join Date: May 2001
Posts: 911
Default

Not sure if there's a de-facto standard for C/C++ but my organization used cxxtest for unit testing which is an open source unit testing framework for C++.

Good luck
__________________
-dc-
beyonddc is offline   Reply With Quote
Old 12-30-2012, 03:56 AM   #4
eLiu
Diamond Member
 
Join Date: Jun 2001
Posts: 6,408
Default

I've been trying to make this decision as well. Having not tried either, it looks like boost.test and googletest are the best options available right now (best in my opinion, measured by feature set & likelihood of continued future support/development). I'm leaning toward googletest but if other people at work are already using boost, then I think there's little reason to introduce more dependencies; i.e., googletest isn't substantially better.

Both of these are kinda heavy in the footprint department so if you want something really lightweight, I think there are things like cutest for C++.

You can search around for some well-informed comparisons of various C++ testing frameworks. Wikipedia is a decent starting place in terms of just listing out which frameworks have what [commonly] desired options. I'll say that the direct analogues of things like junit are *not* what you want in C++; those frameworks are pain.
__________________
Their's not to make reply,<BR>Their's not to reason why,<BR>Their's but to do and die.<BR><BR>My Rigs
eLiu is offline   Reply With Quote
Old 12-30-2012, 02:47 PM   #5
cytg111
Golden Member
 
Join Date: Mar 2008
Posts: 1,279
Default

also, while not putting anand's programming section down, you'd get alot more attention, experience and numbers at places like stackoverflow and codeproject.
__________________
404
cytg111 is offline   Reply With Quote
Old 12-30-2012, 09:50 PM   #6
Markbnj
Moderator
Programming
 
Markbnj's Avatar
 
Join Date: Sep 2005
Posts: 11,661
Default

Quote:
Originally Posted by cytg111 View Post
also, while not putting anand's programming section down, you'd get alot more attention, experience and numbers at places like stackoverflow and codeproject.
I'll give you attention and numbers. Experience? Not so much.
__________________
Everytime I try to tell you, the words just come out wrong

**
Some meaningless scribbling of no account

The 4th Realm

Arts and Letters Daily - Get some culture
Markbnj is offline   Reply With Quote
Old 12-31-2012, 01:27 AM   #7
veri745
Golden Member
 
veri745's Avatar
 
Join Date: Oct 2007
Location: Texas
Posts: 1,092
Default

I use Google Test and Google Mock at work and like it a lot. It works pretty slick.
__________________
Heat
veri745 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.