Simsons
Simsons

Reputation: 12735

Can I create automatic Unit Tests for C++

When I create a program using C# and VS2008 , then I can create a test case just by Rightclicking on the method. But I am not sure If I can create the tests in the same way if it is a C++ project.

Upvotes: 1

Views: 1078

Answers (4)

AudioDroid
AudioDroid

Reputation: 2322

I agree with the answers above, just adding...or use the boost library: http://www.boost.org/doc/libs/1_35_0/libs/test/doc/components/utf/index.html

Upvotes: 1

Tom E
Tom E

Reputation: 2482

You might want to take a look at CppUnit or googletest for unit testing with C++. You won't have the IDE generation of test cases, but there are unit testing frameworks out there.

Upvotes: 0

Mass Nerder
Mass Nerder

Reputation: 44

Due to the lack of reflection in C++, you propably wont be able to have these kind of unit tests, VS provides.

Upvotes: 2

CJBrew
CJBrew

Reputation: 2787

I'm pretty sure you can't. You can create a C++/CLI test project and tests manually though. The IDE will create a C++/CLI test class with stubs etc. for you.

Upvotes: 1

Related Questions