0

I have a class with a method called func and it takes a bool argument and returns void.

class Test {
public:
    void func (bool b);
}

To test it, I use VS UnitTest framework and would like to test with Assert::ExpectException. It needs a FUNCTOR type as its argument. How should I decorate the func method - as a lambda function or operator () in another class- to be tested?

  • [How to call the Assert::ExpectException correctly?](https://stackoverflow.com/questions/54268091/how-to-call-the-assertexpectexception-correctly) may help you use the overload that accepts a function pointer. – Retired Ninja May 27 '23 at 10:38

0 Answers0