编译lib
tar -xvf gmock-1.5.0.tar.bz2
cd gmock-1.5.0/
./configure
make
sudo make install
编译自带的测试例子
cd make
make
./gmock_test
Running main() from gmock_main.cc
[==========] Running 13 tests from 3 test cases.
[----------] Global test environment set-up.
[----------] 6 tests from InitGoogleMockTest
[ RUN ] InitGoogleMockTest.ParsesInvalidCommandLine
[ OK ] InitGoogleMockTest.ParsesInvalidCommandLine (0 ms)
[ RUN ] InitGoogleMockTest.ParsesEmptyCommandLine
[ OK ] InitGoogleMockTest.ParsesEmptyCommandLine (0 ms)
[ RUN ] InitGoogleMockTest.ParsesSingleFlag
[ OK ] InitGoogleMockTest.ParsesSingleFlag (0 ms)
[ RUN ] InitGoogleMockTest.ParsesUnrecognizedFlag
[ OK ] InitGoogleMockTest.ParsesUnrecognizedFlag (0 ms)
[ RUN ] InitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag
[ OK ] InitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag (0 ms)
[ RUN ] InitGoogleMockTest.CallsInitGoogleTest
[ OK ] InitGoogleMockTest.CallsInitGoogleTest (1 ms)
[----------] 6 tests from InitGoogleMockTest (1 ms total)
.......................
阅读(4774) | 评论(0) | 转发(0) |