Tests for executable
Closed this issue · 5 comments
We collect molfiles that elicit specific behavior (e.g., errors): https://github.com/IUPAC-InChI/InChI_Dev/tree/main/Development/Test_structures/Molfiles
Did you already pick a unit testing framework? I am familiar with Catch2 but I guess it's as good as any leading one nowadays. However, I started using that one because of the extremely simple steps I needed to integrate it in the cmake build. If you like, I can provide you with a scaffold to add tests after I finalize the changes for cmake support in #37
By the way, the link is 404
Did you already pick a unit testing framework?
I was considering pytest (calling InChI via https://docs.python.org/3/library/ctypes.html or https://docs.python.org/3/library/subprocess.html). I'll look into https://github.com/catchorg/Catch2 as well, thanks for the suggestion!
the link is 404
I should stop referring to https://github.com/IUPAC-InChI/InChI_Dev/, seems pretty volatile.
Closing with 290f547.
Note that technically, these aren't unit tests. The artifact under test is the InChI executable rather than specific code units. In a sense what's being done here is "black box" testing, expecting the "black box" (i.e., executable) to generate specific results for specific inputs.