#
# Args: Test_name_string args_4_picstats [picstats_results]
#
VIEW_RENDER
PICSTATS ${$argv[2]}
IF ${$root.rc.count!=$argv[3]} GOTO fail
IF ${$root.rc.avg_r<$argv[4]-25} GOTO fail
IF ${$root.rc.avg_r>$argv[4]+25} GOTO fail
IF ${$root.rc.avg_g<$argv[5]-25} GOTO fail
IF ${$root.rc.avg_g>$argv[5]+25} GOTO fail
IF ${$root.rc.avg_b<$argv[6]-25} GOTO fail
IF ${$root.rc.avg_b>$argv[6]+25} GOTO fail
IF ${$root.rc.sig_r<$argv[7]-25} GOTO fail
IF ${$root.rc.sig_r>$argv[7]+25} GOTO fail
IF ${$root.rc.sig_g<$argv[8]-25} GOTO fail
IF ${$root.rc.sig_g>$argv[8]+25} GOTO fail
IF ${$root.rc.sig_b<$argv[9]-25} GOTO fail
IF ${$root.rc.sig_b>$argv[9]+25} GOTO fail
! regression/common/sayok ${$root.func.strings.quote($argv[1])}
QUIT

:fail
! regression/common/saynote "Expected ${$root.rc.count} ${(int)($root.rc.avg_r+0.5)} ${(int)($root.rc.avg_g+0.5)} ${(int)($root.rc.avg_b+0.5)} ${(int)($root.rc.sig_r+0.5)} ${(int)($root.rc.sig_g+0.5)} ${(int)($root.rc.sig_b+0.5)}"
! regression/common/sayfail ${$root.func.strings.quote($argv[1])}
QUIT
