Skip to content

An example of using Azure umock-c mocking library to mock C files for unit test.

License

Notifications You must be signed in to change notification settings

maxpeng/umock_c_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

umock_c Example

This is an example about using Azure/umock-c: A pure C mocking library to mock C files for unit test.

Prerequisites

  1. CMake
  2. GNU C compiler

Directory Structure

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

References:

  1. Azure/umock-c: A pure C mocking library
  2. Azure/azure-ctest: A simple portable C test runner
  3. Azure/azure-c-testrunnerswitcher
  4. CMake Tutorial - JohnLamp.netJohnLamp.net
  5. CMake Tutorial | CMake
  6. Introduction to CMake by Example | derekmolloy.ie

Build Status

About

An example of using Azure umock-c mocking library to mock C files for unit test.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages