googleã«ããå ¬éããã¦ããgoogle mockã使ããããã£ãã®ã§ä½¿ãæ¹ç´¹ä»ã http://code.google.com/p/googlemock/ ããè½ã¨ãã¦ããã£ã¨å ¥ãã¾ãããã 使ãããã·ã¼ã³ã¨ãã¦ã¯ãå åã¢ã¸ã¥ã¼ã«åããããªãã¸ã§ã¯ãæåããã°ã©ã ä¸ã§ int main(){ A a; B b; func(&a, &b); // a->hoge(1) 㨠b->fuga(2,3) ãå¼ã°ãã¦æ¬²ããï¼ } ãã®æ§ã«ç¹å®ã®é¢æ°ãçã£ãéãã®åä½ããã¦æ¬²ãã(ã¨ãããããã®åä½ããããã¨ãä»æ§åãããå ´å) #include <gtest/gtest.h> #include <gmock/gmock.h> class mock_A{ public: MOCK_METHOD1(hoge,void(int)); // void hoge(int);ã¨å義 }; class mo
{{#tags}}- {{label}}
{{/tags}}