项目作者: thinkinglabs

项目描述 :
Bootstrap project for CPP kata's using Google Test
高级语言: CMake
项目地址: git://github.com/thinkinglabs/kata-bootstrap-cpp-googletest.git


Kata Bootstrap for CPP and Google Test

This is a bootstrap project for kata’s in CPP using Google Test.

The project makes use of Conan.io to download the Google Test library as a dependency. It’s a simplified setup as tests are located in the main sources. As a result the binary produced by this project is the test runner.

A better option would be to locate tests in the sources sub-directory of the test_package directory and make use of Conan.io’s test command. This way of working has been implemented for Fizzbuzz kata in cpp using Catch and Conan.io.

Basic Setup

To install Conan:

  1. $ pip install conan

Build

To build the project:

  1. $ conan install . --build=gtest -if ./build && conan build . -bf ./build

All of this is also done by ./build.sh.

After having build the project for the first time, you can rebuild it from the ./build folder using make:

  1. $ cd build
  2. $ make

Run unit tests

To run the unit tests:

  1. $ cd build
  2. $ make test

or

  1. $ cd build
  2. $ ctest

If you want more verbosity:

  1. $ ctest -V

Clean up

To clean up the project, just delete the ./build folder:

  1. $ rm -rf build