String matching is the problem of finding all occurrences of a given pattern in a given text. There is a string matching tool that verifies algorithm(s) by the number of matched occurrence, not by the position-numbers of matched occurrence, see this post for an example.
SMART (String Matching Algorithms Research Tool) is an open source software which provides a standard framework for researchers in string matching. It helps users to test, design, evaluate and understand existing solutions for the exact string matching problem. In a paper (page 104) the author of the research article and the programmer of the tool wrote:
Algorithm verification
The tool verifies that all tested algorithms work properly. This verification is done by counting the number of matches returned by the procedure and testing whether the search stops properly at the end of the text. Since all searched patterns are always randomly extracted from the text, it is guaranteed that the number of occurrences is always equal or greater than 1..
How one can prove or convince other, that the number of occurrence is enough to verify an algorithm works 100% or provide 100% correct solutions?
It could be the case that I am missing something about the tool and article related to this, but if not, what is the explanation that this tool is reliable? Note, article related to this tool is published in ACM and the author is a research academic.
Edit:
The following is found in this link:
If the algorithm does not run under particular conditions (for instance when the length of the pattern is less than a given value), please make it return the value -1.