Coder Social home page Coder Social logo

google-test-examples's Introduction

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

  1. Google test will be downloaded from GitHub and built with your project

How to use:

  1. git clone https://github.com/snikulov/google-test-examples.git
  2. cd google-test-examples
  3. mkdir build
  4. cd build
  5. cmake ..
  6. cmake --build .
  7. ctest -VV

CI status:

Build Status | Build status

Known issues:

  • TBD

How to use (alternativ with docker containers)

Get repo

$ git clone https://github.com/snikulov/google-test-examples.git
$ cd google-test-examples

CMake

We can use CMake to configure/build/running tests:

Host side

$ cmake -P build.cmake

Docker Containers side

cmake -P build_with_docker.cmake

Makefile

Targets

$ make [tab]
make all
all                        build/Makefile             configure                  google-test-examples_test
build                      clean                      DOCKER_COMMAND             run
build_directory            clean_docker_image         docker_image
build_docker_image         CMAKE_COMMAND              DOCKER_IMAGE

Configure/Build/Running tests (with docker containers)

$ make all
docker build -t atty/google-test-examples:latest --file docker/Dockerfile .
Sending build context to Docker daemon  221.2kB
Step 1/1 : FROM rikorose/gcc-cmake:latest
...
1/1 Test #1: test1 ............................   Passed    0.00 sec
100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.00 sec

Screencast recording

asciicast

google-test-examples's People

Contributors

gocarlos avatar juanjodiaz avatar kreczko avatar nicholasguyett avatar oflebbe avatar snikulov avatar yoyonel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-test-examples's Issues

Broken

[100%] Building CXX object CMakeFiles/google-test-examples_test.dir/test/cpp_sorter_test.cpp.o
make[2]: *** No rule to make target ext/gtest/src/googletest-build/ReleaseLibs/libgtest.dylib', needed bygoogle-test-examples_test'. Stop.
make[1]: *** [CMakeFiles/google-test-examples_test.dir/all] Error 2
make: *** [all] Error 2

:(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.