cpp-googletest-gtest-unit-test

Install

My environment is Ubuntu 18.04 (bionic)

1
2
3
4
5
6
7
8
9
10
11
12
13
~$ sudo apt install libgtest-dev
~$ sudo apt install cmake
~$ cd /usr/src/googletest/googletest
~$ sudo makir build
~$ cd build
~$ sudo cmake ..
~$ sudo make
~$ sudo cp libgtest*.a /usr/lib/
~$ cd ..
~$ sudo rm -rf ./build
~$ sudo mkdir -p /usr/local/lib/googletest/
~$ sudo ln -s /usr/lib/libgtest.a /usr/local/lib/googletest/libgtest.a
~$ sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/googletest/libgtest_main.a

Sample

Please refer to the following link:
https://github.com/iwdmb/maxmin-googletest-sample

Reference