/basic-gtest

This repo demonstrates a basic C++ unit test with Google's gtest.

Primary LanguageC++

A basic demo of Unit Testing in C++ using Google's free Gtest

Build Status

The project is testing an my basic visitor pattern demo. I made notes on this pattern here.

No need to install gtest because of the use of Cmake's FetchContent feature to clone and setup gtest. The test's CMakeList is isolated in its subdirectory which the top-level adds with add_subdirectory(test), however with this setup it can be a separate project on its own.

The travis setup also builds for clang and gcc on amd64 and arm64.

This Project also illustrates very basic stuffs like

Try it out

Just clone and run this script: . ./run.sh
Nothing fancy, the focus is the pattern and basic tool setup.