[gdk-pixbuf] Add an xbm test



commit 9a0a106a34e8df803773df5fd5b1ca1556f24984
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 19 00:31:43 2013 -0500

    Add an xbm test
    
    This tests that we correctly load a file with the .xbm extension
    using both gdk_pixbuf_new_from_file and gdk_pixbuf_new_from_file_at_scale.

 tests/pixbuf-scale.c        |    1 +
 tests/test-images/valid.xbm |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c
index 1445b3e..4fd9fd5 100644
--- a/tests/pixbuf-scale.c
+++ b/tests/pixbuf-scale.c
@@ -71,6 +71,7 @@ main (int argc, char **argv)
   g_test_add_data_func ("/pixbuf/scale/ras", "test-images/valid_ras_test", test_scale);
   g_test_add_data_func ("/pixbuf/scale/tga", "test-images/valid_tga_test", test_scale);
   g_test_add_data_func ("/pixbuf/scale/xpm", "test-images/valid_xpm_test", test_scale);
+  g_test_add_data_func ("/pixbuf/scale/xbm", "test-images/valid.xbm", test_scale);
 
   return g_test_run ();
 }
diff --git a/tests/test-images/valid.xbm b/tests/test-images/valid.xbm
new file mode 100644
index 0000000..c7df993
--- /dev/null
+++ b/tests/test-images/valid.xbm
@@ -0,0 +1,10 @@
+#define valid_xbm_test_width 20
+#define valid_xbm_test_height 20
+#define valid_xbm_test_x_hot 10
+#define valid_xbm_test_y_hot 10
+static unsigned char valid_xbm_test_bits[] = {
+   0x00, 0x00, 0x00, 0xea, 0xfb, 0x03, 0x2a, 0x2a, 0x02, 0xfa, 0xae, 0x03,
+   0x82, 0x20, 0x00, 0xba, 0xbb, 0x03, 0x2a, 0x8a, 0x02, 0xae, 0xfb, 0x02,
+   0xa0, 0x00, 0x02, 0xbe, 0xfa, 0x03, 0x82, 0x0a, 0x00, 0xfa, 0xfb, 0x03,
+   0x02, 0x08, 0x02, 0xee, 0xab, 0x03, 0x28, 0xaa, 0x02, 0xba, 0xbb, 0x02,
+   0x82, 0x80, 0x02, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]