mercredi 13 juillet 2022

testing a template function with two class by gmock [closed]

I have a C++ Class that has a function as:

template <typename A, typename B>
B  func(int n){
...}

to do a unit test on this I have

  EXPECT_THAT(func<A,V>(A),
              IsOkAndHolds(EqualsProto(expected)));

This throws an error :

too many arguments provided to function-like macro invocation

This is most likely because , in the <A, B>. How can I resolve this?

Aucun commentaire:

Enregistrer un commentaire