This is an example about using Azure/umock-c: A pure C mocking library to mock C files for unit test.
- CMake
- GNU C compiler
umock_c_example
├── CMakeLists.txt --> main cmake configuration files
├── LICENSE
├── readme.md
├── src --> pythagorean example
│ ├── CMakeLists.txt
│ ├── main.c
│ ├── pythagorean.c
│ ├── pythagorean.h
│ ├── square_root.c --> dependency of pythagorean.c
│ └── square_root.h
├── tests --> unit test against pythagorean.c
│ ├── CMakeLists.txt
│ └── pythagorean_ut --> unit test by umock_c
└── testtools --> unit test tools
├── CMakeLists.txt
├── ctest --> ctest unit test library
├── test_runner --> test runner
└── umock_c --> azure umock_c mocking library