$ cd build $ make clock_replacer_test $ ./test/clock_replacer_test Running main() from gmock_main.cc [==========] Running 5 tests from 1 test suite. [----------] Global test environment set-up. [----------] 5 tests from ClockReplacerTest [ RUN ] ClockReplacerTest.SampleTest1 [ OK ] ClockReplacerTest.SampleTest1 (0 ms) [ RUN ] ClockReplacerTest.SampleTest2 [ OK ] ClockReplacerTest.SampleTest2 (24 ms) [ RUN ] ClockReplacerTest.Victim [ OK ] ClockReplacerTest.Victim (18 ms) [ RUN ] ClockReplacerTest.Pin [ OK ] ClockReplacerTest.Pin (9 ms) [ RUN ] ClockReplacerTest.Size [ OK ] ClockReplacerTest.Size (1572 ms) [----------] 5 tests from ClockReplacerTest (1624 ms total)
[----------] Global test environment tear-down [==========] 5 tests from 1 test suite ran. (1624 ms total) [ PASSED ] 5 tests.
Buffer Pool Manager test 结果:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ cd build $ make buffer_pool_manager_test $ ./test/buffer_pool_manager_test Running main() from gmock_main.cc [==========] Running 2 tests from 1 test suite. [----------] Global test environment set-up. [----------] 2 tests from BufferPoolManagerTest [ RUN ] BufferPoolManagerTest.BinaryDataTest [ OK ] BufferPoolManagerTest.BinaryDataTest (4 ms) [ RUN ] BufferPoolManagerTest.SampleTest [ OK ] BufferPoolManagerTest.SampleTest (2 ms) [----------] 2 tests from BufferPoolManagerTest (7 ms total)
[----------] Global test environment tear-down [==========] 2 tests from 1 test suite ran. (7 ms total) [ PASSED ] 2 tests.