bool CheckRender::PPMvsPPM( const char *src_file, const char *ref_file, const float epsilon, const float threshold ) { char *ref_file_path = shrFindFilePath(ref_file, m_ExecPath); if (ref_file_path == NULL) { shrLog("\nCheckRender::PPMvsPPM unable to find <%s> in <%s> Aborting comparison!\n", ref_file, m_ExecPath); return false; } if (src_file == NULL || ref_file == NULL) { shrLog("\nCheckRender::PPMvsPPM: Aborting comparison\n"); return false; } return (shrComparePPM(src_file, ref_file_path, epsilon, threshold) == shrTRUE ? true : false); }
bool CheckRender::PPMvsPPM( const char *src_file, const char *ref_file, const float epsilon, const float threshold ) { unsigned long error_count = 0; char *ref_file_path = shrFindFilePath(ref_file, m_ExecPath); if (ref_file_path == NULL) { printf("CheckRender::PPMvsPPM unable to find <%s> in <%s> Aborting comparison!\n", ref_file, m_ExecPath); printf(">>> Check info.xml and [project//data] folder <%s> <<<\n", ref_file); printf("Aborting comparison!\n"); printf(" FAILED!\n"); error_count++; } if (src_file == NULL || ref_file_path == NULL) { printf("PPMvsPPM: Aborting comparison\n"); return false; } printf(" src_file <%s>\n", src_file); printf(" ref_file <%s>\n", ref_file_path); return (shrComparePPM( src_file, ref_file_path, epsilon, threshold, true ) == shrTRUE ? true : false); }