[cairo-commit] cairo-perl/t CairoSurface.t,1.18,1.19
Torsten Schoenfeld
commit at pdx.freedesktop.org
Fri Jan 5 13:01:51 PST 2007
Committed by: tsch
Update of /cvs/cairo/cairo-perl/t
In directory kemper:/tmp/cvs-serv2744/t
Modified Files:
CairoSurface.t
Log Message:
* t/CairoSurface.t: Fix an endianness problem.
Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CairoSurface.t 23 Nov 2006 19:09:12 -0000 1.18
+++ CairoSurface.t 5 Jan 2007 21:01:47 -0000 1.19
@@ -9,6 +9,8 @@
use strict;
use warnings;
+use Config; # for byteorder
+
use Test::More tests => 64;
use constant {
@@ -54,7 +56,15 @@
$cr->fill;
is ($surf->get_data, $data);
- is ($surf->get_data, pack ('CCCC', 0, 0, 255, 255));
+
+ my $bo = $Config{byteorder}+1;
+ if ($bo == 1234) {
+ is ($surf->get_data, pack ('CCCC', 0, 0, 255, 255));
+ } elsif ($bo == 4321) {
+ is ($surf->get_data, pack ('CCCC', 255, 255, 0, 0));
+ } else {
+ ok (1, 'Skipping get_data test; unknown endianness');
+ }
}
}
More information about the cairo-commit
mailing list