Commit Graph

13 Commits

Author SHA1 Message Date
Jakub Jelen 9a6cf6af3e configure: Add option to generate code coverage (for unit tests)
./configure --enable-code-coverage --disable-optimization
make check
make code-coverage-capture
lcov --summary OpenSC-*-coverage.info

This does not work well with Windows so on windows it should be disabled (WIP)
2020-01-07 17:07:48 +01:00
Jakub Jelen e8af4fc167 unittests: Add more coverage corner cases for BIT STRINGs 2020-01-07 14:50:48 +01:00
Jakub Jelen 3af6d7999e unittests: Add tests for non-minimal OBJECT ID encoding
Thanks @hkario for suggestions
2020-01-07 14:50:48 +01:00
Jakub Jelen 37c8c46623 unittests: Simplify the OBJECT ID tests 2020-01-07 14:50:48 +01:00
Jakub Jelen 1e2b0fe45f unittests: Restructure the BIT STRING tests 2020-01-07 14:50:48 +01:00
Jakub Jelen 71e45bb5a7 unittest: Rewrite the INTEGER unittests to use macros and avoid code duplication 2020-01-07 14:50:47 +01:00
Jakub Jelen aaa302ca35 asn1: Allow non-strict INTEGER parsing for other code paths (FCI parsing) 2020-01-07 14:50:47 +01:00
Jakub Jelen 4569009418 unittests: Improve test coverage mostly with negative test cases
Thanks @hkario for review
2020-01-07 14:50:47 +01:00
Jakub Jelen 611d1cea4c unittests: Verify BIT STRING parsing as integers 2020-01-07 14:50:47 +01:00
Jakub Jelen 8d49e4a305 unittests: Test encoding of OIDs and integers 2020-01-07 14:50:47 +01:00
Jakub Jelen 7971bfded3 unittests: Verify parsing of more OIDs 2020-01-07 14:50:47 +01:00
Jakub Jelen b6b9a886f9 unittests: Verify negative ASN1 integeres parsing 2020-01-07 14:50:47 +01:00
Jakub Jelen 8e6d2e251d unittests: Reproducer for undefined shift in ASN1 parser 2020-01-07 14:50:47 +01:00