Coder Social home page Coder Social logo

hnkr / googletest-unit_test Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1 MB

CMake 1.20% Starlark 0.60% Shell 0.96% C++ 83.13% C 1.01% Python 13.10%
gtest gmock googletest unittest unit-testing mocking fixture-test embedded-systems embedded-c embedded cmakelists cmake cmake-examples

googletest-unit_test's Introduction

googleTest-unit_test

  • Example usages of GTest and GMock from googletest.
  • Includes 3 mini-projects:
    • test_hello
    • test_fixture
    • test_mock

Requirements

  • CMake (version > 3.15.2)

Projects

- test_hello : How to start with GTest
- test_fixture: How to use fixture from GTest
- test_mock: How to use GMock from googletest with an example. APP_SOURCES is assumed the code under test, which is also using an interface to receive data. MOCK is the mocking of external interface on which the APP_SOURCES has dependency.

Build & Run

  • Build:
    • Get in build directory of each mini-project and type "cmake .."
    • In the build directory type "make"
  • Run:
    • ./test_hello for test_hello mini-project.
    • ./test_fixture for test_fixture mini-project.
    • ./test_mock for test_mock mini-project.

googletest-unit_test's People

Contributors

hnkr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.