|
From: doug s. <hig...@ho...> - 2013-05-18 22:37:48
|
>> 3. Compare - perl script that compares Record vs Playback snapshots for a given test file
>> -- there might be several snapshots for a given test file run, named by the frame#
>> -- calls the platform file compare function
>> --- in ms windows its fc file1 file2
> .
> The perl I have on my windows XP has compare(f1,f2)
> So this works with text and binary files:
> #!/usr/bin/env perl
> use File::Compare;
> if (compare("file1.rgb","file2.rgb") == 0) {
> print "They're equal\n";
> }else{
> print "They're different\n";
> }
> -Doug
> more...
> -IIRC I downloaded the Activestate perl from http://www.perl.org/get.html
.
2 screen snapshots of the same scene 1.wrl that _should_ be equal are different, and fc shows the differences spread out. (I hid the statusbar with its frames-per-second readout, by mousing over it, which brings up the menu bar). Hypotheses for the diff:
H0: something about my video board - a few bad pixels and I have the window in a different place
H1: floating point computations round differently depending how many frames have been rendered
H2: something in the .bmp header
If it's a small difference like 1/256 (1 bit out of a pixel's color value) perhaps a special compare function will be needed.
-Doug
|