Commit 8eede392 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Simple changes to tests.

parent 59ffa467
......@@ -35,7 +35,7 @@ IF (ICET_MPIRUN_EXE)
SET(POST_TEST_FLAGS ${ICET_MPI_POSTFLAGS})
ENDIF (ICET_MPIRUN_EXE)
SET(ICET_TEST_FLAGS "" CACHE STRING "Arguments given to the test program.")
SET(ICET_TEST_FLAGS "-redirect" CACHE STRING "Arguments given to the test program.")
MARK_AS_ADVANCED(ICET_TEST_FLAGS)
SEPARATE_ARGUMENTS(ICET_TEST_FLAGS)
......@@ -48,7 +48,7 @@ FOREACH (test ${MyTests})
ENDFOREACH(test)
IF (WIN32)
ADD_CUSTOM_TARGET(logclean erase log.????)
ADD_CUSTOM_TARGET(logclean erase log.???? *.ppm)
ELSE (WIN32)
ADD_CUSTOM_TARGET(logclean rm -f log.????)
ADD_CUSTOM_TARGET(logclean rm -f log.???? *.ppm)
ENDIF (WIN32)
......@@ -38,6 +38,8 @@ static void draw(void)
printf("Leaving draw\n");
}
#define DIFF(x, y) ((x) < (y) ? (y) - (x) : (x) - (y))
int RandomTransform(int argc, char *argv[])
{
int i, x, y;
......@@ -280,9 +282,9 @@ int RandomTransform(int argc, char *argv[])
for (y = 0; y < local_height; y++) {
for (x = 0; x < local_width; x++) {
if ( db[y*local_width + x]
!= refdbuf[(y+ref_off_y)*SCREEN_WIDTH
+x + ref_off_x] ) {
if (DIFF(db[y*local_width + x],
refdbuf[(y+ref_off_y)*SCREEN_WIDTH
+x + ref_off_x]) > 0x0000FFFF) {
/* Uh, oh. Pixels don't match. This could be a */
/* genuine error or it could be a floating point */
/* offset when projecting edge boundries to */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment