Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set data-driven tests for C++ tests using MSTest?

I am trying to use microsoft unit tests for native code, however after writing basic tests i have run into a problem: i could not find how to make test methods with parameters.

When searching for the topics, i found some ways to add such methods, namely to write data-driven tests (for example, http://msdn.microsoft.com/en-us/library/ms182527.aspx). However i am at loss as to how to use it together with native C++ tests.

As far as i could determine, no TEST_METHOD macro exists for functions with parameters, no macro for 'DataSource' attribute exists etcetera.

Is there an example of setting up data-driven test of native c++ code using MsTest?

like image 807
Srv19 Avatar asked Nov 11 '22 21:11

Srv19


1 Answers

Data Driven tests are not supported in Native C++ MSTest Framework.

like image 87
user2029971 Avatar answered Nov 15 '22 06:11

user2029971