Sources/
-- C source filesSources/Utils/
-- Utilities that are specific for the C implementationSources/Tests/
-- Unit testsSources/Build/
-- Object files generated after compilationSources/Extraction/
,General/
,Matching/
,Templates/
, ... -- C implementation of the library. The directory structure and naming are analogous to the original C# code.TestData/
input data and expected output for unit tests
Compilation can be done using GCC and GNU make.
$ cd Sources
$ make libafis
Object files are created in the Build/
directory. The library sources are compiled only but not linked.
To get make
and gcc
installed run: xcode-select --install
in a terminal window. Then the linux instructions apply.
- Works out of the box using Cygwin.
The easiest way to get up and running is with Sublime
- You can then use Package Control
- Which will help you get C Improved
$ cd Sources
$ make utest
The result is an executable called all_tests
in the Build/
directory.
$ Sources/Build/all_tests ../TestData
You can check for memory leaks using valgrind
.
Once you've built using make
, run the tests/program in your console, but prefix the command with the valgrind
options like this:
$ valgrind --leak-check=full --log-file="valgrind.log" -v ./Build/all_tests ../TestData/
This will make valgrind
run a memory check on the tests and save its result to the file valgrind.log
. This will include the amount of alloc
's and free
's, along with information on any memory which might have leaked. It also includes the total amount of heap memory allocated while the program was running.
If you have clang
installed, you can use scan-build
to perform static analysis on the code. It generates a html report which you can view for any problems it might have found with the code.
$ scan-build -V make libafis
This will generate a html report for you after building libAFIS and open a web browser for you with the generated report open.
There is a 'MinutiaeTestApp' inside TestData to test the exported templates with SourceAFIS.
Currently our focus is the branch image-to-template-test
, pull request: #32.