Go Back   AnandTech Forums > Software > Programming

· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· AMD Video Cards
· Nvidia
· Displays
· 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
· Home and Garden
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2015
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions

Thread Tools
Old 12-17-2012, 07:18 PM   #1
IHateMyJob2004's Avatar
Join Date: Sep 2004
Posts: 17,633
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?
IHateMyJob2004 is offline   Reply With Quote
Old 12-17-2012, 07:58 PM   #2
Crusty's Avatar
Join Date: Sep 2001
Location: ATX
Posts: 12,684

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.
Crusty is offline   Reply With Quote
Old 12-28-2012, 01:15 PM   #3
Senior Member
Join Date: May 2001
Posts: 911

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
beyonddc is offline   Reply With Quote
Old 12-30-2012, 04:56 AM   #4
Diamond Member
Join Date: Jun 2001
Posts: 6,408

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, 03:47 PM   #5
Platinum Member
Join Date: Mar 2008
Posts: 2,024

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'm telling you, the revolution, it is coming :
cytg111 is offline   Reply With Quote
Old 12-30-2012, 10:50 PM   #6
Elite Member
Moderator Emeritus
Markbnj's Avatar
Join Date: Sep 2005
Posts: 15,570

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, 02:27 AM   #7
Golden Member
veri745's Avatar
Join Date: Oct 2007
Location: Texas
Posts: 1,138

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

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 10:00 PM.

Powered by vBulletin® Version 3.8.8 Alpha 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.