Skip to content

aachi-yang/gt

Repository files navigation

Google Test Sample

Reference

Source Tree

./gt
├── CMakeLists.txt
├── CMakeLists.txt.in
├── README.md
├── add.cc
├── add.h
├── build
└── gt.cc

Build

    git clone .... 
    cd gt    
    mkdir build
    cd build
    cmake ..
    make
    ./gt

Run

edward-pro:build edward$ ./gt

Result:

[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from AddTest
[ RUN      ] AddTest.TwoAndTwo
[       OK ] AddTest.TwoAndTwo (0 ms)
[ RUN      ] AddTest.TwoAndOne
[       OK ] AddTest.TwoAndOne (0 ms)
[----------] 2 tests from AddTest (0 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (0 ms total)
[  PASSED  ] 2 tests.

make test or ctest

Result:

    Start 1: gt
1/1 Test #1: gt ...............................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.01 sec

About

Google Test Sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published