Skip to content

Commit

Permalink
Explanation of how to check code coverage added to the README.md file…
Browse files Browse the repository at this point in the history
…, useful for serious developers who need a library with a complete coverage
  • Loading branch information
iarfen committed Jul 29, 2024
1 parent 67ce09f commit 63e9aa7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,18 @@ You can type the command **cpack --help** to check all available generators.
You can test scifir-units executing ctest if you want. It's not needed to execute those tests in your local computer, but you can do it if for any reason you find it helpful. To build the tests, add the flags **-DBUILD_TESTING=ON** to the first preset command, in order to set the variable BUILD_TESTING to ON, that variable configures the build to build also all the tests.
```
ctest --preset=<your-preset>
ctest --preset=<your-preset> -L tests
```
In order to check the code coverage of the unitary tests, execute after that first command the following commands:
```
ctest --preset=<your-preset> -L tests -T coverage
gcovr .
```
gcovr prints the % of coverage for each piece of code, based on gcov data. You can install gcovr through apt in some Linux distributions, for other operating systems search through internet how to install gcovr there, usually it's easy.
## Introduction
The Scifir Collection is a set of libraries that allows to create the software of scientific inventions, being them scientific machines or just scientific software. This library, scifir-units, allows to handle scalar and vectorial units inside the code. They are very lightweight, they size similar to a float, and can be used extensively to do any math calculation necessary for the invention. The prefixes can be changed, in order to display the units in the more proper dimensions. Also, all the conversions known are supported. Then, instead of the meter, a length can be described by a light-year, an astronomical unit (AU), among other units of measure.
Expand Down

0 comments on commit 63e9aa7

Please sign in to comment.