cuneiform team mailing list archive
-
cuneiform team
-
Mailing list archive
-
Message #00233
Re: Need help - how to implement automatic OCR test
On Fri, Feb 6, 2009 at 9:02 AM, Dmitry Polevoy
<openocr.polevoy@xxxxxxxxx> wrote:
> Can you help me to find some information about automatic test?
> I know that simple OCR test is image recognition and comparing OCR results
> with ideal output. But I can't understand how it should be implement like
> console application (special console output, return code or some thing else)
> for automatic testing with CTest.
CTest documentation seems to be lacking but a quick test indicates
that return value is how it determines success.
So you should do something like this.
int main(int argc, char **argv) {
int success;
success = do_test();
if(success)
return 0;
return 1;
}
I also suggest that for clarity we place the tests in their own file,
such as test.cmake and then include that from CMakeLists.txt.
Follow ups
References