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

jmwilhite/cpp-gtest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build 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

Languages

  • C++ 56.8%
  • Makefile 43.2%