Skip to content

A simple example for writing unit tests for a C++ class using GoogleTest

Notifications You must be signed in to change notification settings

ChicoState/cpp-gtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

This is a simple example of a C++ class called Rando that has practice functions.

A makefile is provided, but https://github.com/google/googletest must first be installed on the development environment.

Configuring GoogleTest on Your Machine

  • Create an environment variable GTEST_DIR that is set to the location of the googletest sub-directory, within the locally cloned repo. For example:

export GTEST_DIR = /usr/local/src/googletest/googletest

  • Save your changes to the Makefile. Check to make sure it works with the following commands:

make

./RandoTest

About

A simple example for writing unit tests for a C++ class using GoogleTest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published