Closed apavlenko closed 8 years ago
In most JNI function's catch blocks can not be tested because exceptions in theses function can not be generated by any induced test scenarios.
In file global.cpp line 70-72 can not be tested because this code works only if system function return error code (-1).
In metadataset.cpp line 67 can not be tested because to Metadata class instance field 'm_vReferences' can not be added reference with null pointer instead of shared pointer to Metadata class instance. Since Reference instances are created and added to 'm_vReferences' field only via Metadata::addReference() method which have check reference's Metadata isn't null.
In metadata.cpp line 119 can not be tested because Metadata class instance field 'm_nNumOfFrames' can not ever become < 0.
In metadata.cpp lines 425, 448, 508 can not be tested because Metadata class instance field 'm_spDesc' can not be ever null pointer.
In metadatastream.cpp lines 380 and 418 can not be tested because MetadataSchema instance's field 'Name' can not be wherever set to empty.
In https://github.com/anna-plyakina/vmf/blob/vmf_improve_test_coverage2/modules/vmfcore/src/metadatastream.cpp#L693 and 705 can not be tested because VideoSegment instance's fields "duration", "height", "width" can not be ever set to negative value.
the final coverage result is 77.57% (+13.48%).
All possible VMF code (excluding 3rd-party one, like XMP, libXML2, etc) should be covered by the project tests set; all the uncovered parts should be clearly justified. The existing automated code coverage infra (https://coveralls.io/github/apavlenko/vmf and https://codecov.io/github/apavlenko/vmf) is recommended for use for this task.
NOTE: the resulting coverage should be 80+%