Skip to content

yueneiqi/gmock-cmake-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A sample project illustrating how to perform unit testing with GoogleTest and CMake

Mocking static functions

TLDR: Just run bash ./run.sh

Example code: test/testbaz

Building

mkdir build
cd build
cmake ..
make

Running

cd build && make test

or

build/test/testfoo/testfoo

Refer to this blog post for a detailed explanation of how it works.

About

A sample project using GoogleTest and GMock with CMake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.4%
  • CMake 43.0%
  • Shell 1.6%