How do you generate stubs for template class functions?

jfalterjfalter Posts: 2

When collecting stub information in my test configuration I am not finding references to our functions in template classes. Is there a way to generate stubs for our template class functions?

Here is an example of a template that we are using in another class that is under test. The function func_1 doesn't show up in when we collect stub information.

template <typename T>
class example_class_template
{

public:

   example_class_template()
   : type_data()
   {
   }

   ~example_class_template()
   {
   }

   T func_1(T var)
   {
      return type_data+=var;
   }

private:

   T type_data;

};

Comments

  • piotrpiotr Posts: 27

    At this moment C/C++test supports stubs for non-template functions or fully specialized template functions.

    Creating stubs for regular template functions (or functions that are called from template functions) is not supported.

Sign In or Register to comment.