पर कोई विधि नहीं बुलाया जाएगा, मैं कुछ माफ की स्थिति में किसी भी विफलता के मामले में परीक्षण करना चाहता हूं, Google mock का उपयोग करके। तो कोड होना कुछ की तरह:google mock: मैं कैसे "EXPECT" कर सकता हूं कि नकली
auto mocObj = new MockObj;
EXPECT_NO_METHOD_CALL(mocObj); //this is what I'm locking for
auto mainObj = new MainObj(mocObj , ......and other mocks); // here I simulate a fail using the other mock objects, and I want to be sure the no methods are called on the mockObj
कोई कॉल नहीं होने की उम्मीद है प्रश्न: आप अपनी ऑब्जेक्ट्स को नए क्यों कर रहे हैं? यह अनावश्यक है ... –