Google Mock for nullptr testing

748 views Asked by At

I am going to test this part of code using GMock. I want to check that start method does not execute when BPtr is null.

How can I check this kind of scenario?

 currentPtr=APtr;

         if(nullptr != APtr->BPtr)
          {
            object.start(currentPtr);
          }
0

There are 0 answers