/cpp.unittests

:microscope: explore c++ unit tests using google-test

Primary LanguageCMakeMIT LicenseMIT

C++ Unit Tests

The idea is to explore unit testing on C++ projects.

The use case for this unit test was taken from book Clean C++ . I use google test library for Test-Driven Development (TDD)

Test-driven development (TDD)

Test-driven development (TDD) Is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements

from wikipedia - Test-driven development

Behavior-driven development (BDD)

On other project Algorithms I’m using Catch2 for Behavior-Driven development (BDD)

Behavior-driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software development and management teams with shared tools and a shared process to collaborate on software development

from wikipedia - Behavior-driven development

Continuous Integration

https://travis-ci.org/NelsonBilber/cpp.unittests.svg?branch=master

Project Structure

Forked from Short sample how-to use Google C++ Test Framework in cmakeable projects

How to use it

  1. mkdir build
  2. cd build
  3. cmake ..
  4. cmake –build .
  5. ctest -VV