Use*_*234 7 c++ googletest googlemock
当我尝试使用时:
ON_CALL(mock, foo(_))
抛出编译错误:
Error   1   error C2065: '_' : undeclared identifier    
我正在使用visual studio 2012.
Vol*_*And 19
未声明的标识符总是意味着编译器不理解它(即_)是什么.所以也许你忘记了
#include <gtest/gtest.h>
#include <gmock/gmock.h>
要么
using::testing::_;
请参阅示例并检查.