This is an example of doing a UnitTest project using googltest.
| Build status | Systems / Compilers |
|---|---|
| Linux (gcc7) | |
| Windows (Visual Studio 2017) |
CMake is the chosen build system using ctest.
VSCode is the chosen development IDE.
- googltest for unit test system. (as submodule)
UnitTestEmbeddedC/
├── CMakeLists.txt
├── README.md
├── doc
├── .vscode
├── googletest
│ ├── CMakeLists.txt
│ └── ...
├── src
│ ├── Array.c
│ ├── Array.h
│ └── ...
│── test
│ ├── UnitTestFiles
│ │ └── ...
│ ├── MockFiles
│ │ └── ...
│ ├── Main.cpp
│ └── ...
Directory structure:
src: Directory for source code under test.test: Directory for test code, including unit test and mock files.doc: Directory for documents..vscode: Directory for VSCode configuration.googletest: Directory for submodule googletest.CMakeLists.txt: CMake file.README.md: This file.
mkdir my_project
cd my_project
git clone https://github.com/ProgmaticProgrammer/UnitTestEmbeddedC.git --recursive --progress -v- Open a Developer Command Prompt (VS 2017)
- Open the VSCode from the Command Prompt
cd my_project\UnitTestEmbeddedC
code .-
Choose the
cmake configureto confgure cmake -
Choose the
cmake buildto build vs2017 target -
Choose the
ctest runto configure/build/test as one go
- Integrate with Circleci
- Make it running under GNU/Linux
MIT








