jpcornil-git / ayab-gtest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ayab-gtest

Overview

Blinker example illustrating usage of gtest with no/minimal operational code impact that could be applied to ayab-firmware project

  • Based on dependency injection using interfaces
  • Applied to all objects requiring unit tests (Led and Blinker here) and the hardware abstraction layer (HAL)
    • All (arduino) platform calls are made thru HAL that is replaced by a mocked implementation during tests
  • No dependencies to 3rd party libraries (gtest installed thru platformio, own arduino mock, ...)
  • Cooperative scheduling architecture including an "async" Led implementation

Setup

Install platformio on your machine and update platformio.ini to match your hardware

Build application:

$ pio run

or (build and upload):

$ pio run /upload

Run gtest:

$ pio test -e native

About

License:MIT License


Languages

Language:C++ 97.6%Language:C 2.4%