[Macro]Test Case grouping using Traits
Hello, I have observed that in native unit test framework(c++), there is an option to group test cases using attributes which are reflected as traits in the Test Explorer window in MS VS2012. Following is a an example of the same: BEGIN_TEST_METHOD_ATTRIBUTE(TestMethod3) TEST_OWNER(L"SuperMan") TEST_PRIORITY(2) TEST_METHOD_ATTRIBUTE(L"Category",L"Slow") END_TEST_METHOD_ATTRIBUTE() TEST_METHOD(TestMethod3) { Assert::AreEqual(2,6); } How can this be achieved via Boost Unit Test Library? Are there macros to achieve the same? Mit freundlichen Grüßen / Best Regards, Hemanth Choudary MV RBEI/ETA1
Hemanth Choudary M V (RBEI/ETA1
Following is a an example of the same:
BEGIN_TEST_METHOD_ATTRIBUTE(TestMethod3) TEST_OWNER(L"SuperMan") TEST_PRIORITY(2) TEST_METHOD_ATTRIBUTE(L"Category",L"Slow") END_TEST_METHOD_ATTRIBUTE() TEST_METHOD(TestMethod3) { Assert::AreEqual(2,6); }
How can this be achieved via Boost Unit Test Library? Are there macros to achieve the same?
Boost.Test trunk version facilitates labeling the test units. I think this would give you similar functionality. Regards, Gennadiy
participants (2)
-
Gennadiy Rozental
-
Hemanth Choudary M V (RBEI/ETA1)