Good day to all! I will describe briefly: I have a template class, whose methods need to be tested using Unit tests. Is it possible to somehow bypass the prescribing of tests for each data type (and I need to check the standard data types + self-made structures) or is there no such possibility yet?

I am writing in Visual Studio 2017, for unit tests using CppUnitTestFramework.

  • Here in the English segment I came across such a solution , and specifically the second answer. But I do not know how correct this is. - Xiamera
  • Accepted response to your link does everything right, this answer should be enough to start. - ixSci am
  • No, to get around this will not work. To execute template code, it is necessary to establish them for each specific type. - VTT
  • What framework do you use for unit tests? In Catch2, for example, there are built-in features for this - cpp questions
  • @cppquestions, CppUnitTestFramework in MS VS 2017 - Xiamera

0