Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.28 KB

File metadata and controls

49 lines (30 loc) · 1.28 KB

subpatch - tutorial basic usage

This is an example git repository for a tutorial of the subpatch. You can find the tutorial here: Basic usage.

The project is a very tiny C-library that contains a add function that just adds two integers together. The project contains the following files

How to build

To build the project, execute the commands

$ cmake -B build . 
$ cmake --build build

How to use

The program reads two integers as arguments from the command line and uses the library function to add them together. The result is printed on the console. Example:

$ build/prog 5 6
11

How to test

Some tests are already implement in the file test.c, but not yet useable. In the tutorial you add the dependency to googletest . After that the tests are working.

How to execute the tests:

$ cmake --build build  # build again after adding the dependency
$ build/test

TODOs

Resolve TODOs in prog.c