Skip to content

subpatch/tutorial-basic-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A example project to explain the subpatch command line tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published