Damian
Damian

Reputation: 4631

Ignore C++ unit tests

Is there a simple way to ignore C++ unit tests in Microsoft Unit test Framework? The only way I could find is to set the test priority.

BEGIN_TEST_METHOD_ATTRIBUTE(FooTest)
    TEST_PRIORITY(1)
END_TEST_METHOD_ATTRIBUTE()
TEST_METHOD(FooTest)
{
}

Is there a smarter way to achieve this?

In for example Google Test you can specify tests that can be ignore and write a comment why they are ignored.

Upvotes: 1

Views: 2607

Answers (1)

Josan
Josan

Reputation: 722

Use TEST_IGNORE() instead of the TEST_PRIORITY() in your code snippet.

Upvotes: 2

Related Questions