summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 15:14:27 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-26 15:14:27 +0000
commit6deb1a83b5e83c82d710667cc2ae141b664a4fbf (patch)
tree9794b531482818fcbbf8fc7ef60341978e4e274e /tests
parent6f3a7ef3c818934eb163a9d9f82fd2d591da809b (diff)
[trunk] Add more details in case test fails
Diffstat (limited to 'tests')
-rw-r--r--tests/compareRAWimages.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/compareRAWimages.c b/tests/compareRAWimages.c
index 32575c68..4f183529 100644
--- a/tests/compareRAWimages.c
+++ b/tests/compareRAWimages.c
@@ -38,8 +38,6 @@
#include "opj_getopt.h"
-void compareRAWimages_help_display(void);
-
typedef struct test_cmp_parameters
{
/** */
@@ -51,7 +49,7 @@ typedef struct test_cmp_parameters
/*******************************************************************************
* Command line help function
*******************************************************************************/
-void compareRAWimages_help_display(void) {
+static void compareRAWimages_help_display(void) {
fprintf(stdout,"\nList of parameters for the comparePGX function \n");
fprintf(stdout,"\n");
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline RAW image \n");
@@ -119,6 +117,7 @@ static int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
*******************************************************************************/
int main(int argc, char **argv)
{
+ int pos = 0;
test_cmp_parameters inParam;
FILE *file_test=NULL, *file_base=NULL;
unsigned char equal = 1;
@@ -191,7 +190,7 @@ int main(int argc, char **argv)
/* Read one byte*/
if (!fread(&value_base, 1, 1, file_base)) {
- eof_base = 1;;
+ eof_base = 1;
}
/* End of file reached by the two files?*/
@@ -208,9 +207,10 @@ int main(int argc, char **argv)
/* Binary values are equal?*/
if (value_test != value_base)
{
- fprintf(stdout,"Binary values read in the file are different.\n");
+ fprintf(stdout,"Binary values read in the file are different %x vs %x at position %d.\n", value_test, value_base, pos);
equal = 0;
}
+ pos++;
}
/* Free Memory */