]> Pileus Git - ~andy/gtk/commitdiff
Use the g_test_*() API for this test reviewed by: Richard Hult
authorSven Herzberg <sven@imendio.com>
Fri, 15 Aug 2008 18:57:31 +0000 (18:57 +0000)
committerSven Herzberg <herzi@src.gnome.org>
Fri, 15 Aug 2008 18:57:31 +0000 (18:57 +0000)
2008-08-15  Sven Herzberg  <sven@imendio.com>

Use the g_test_*() API for this test
reviewed by: Richard Hult

* gdk/tests/check-gdk-cairo.c: use the g_test_*() API to permit adding
new tests

svn path=/trunk/; revision=21133

ChangeLog
gdk/tests/check-gdk-cairo.c

index 550ec0a4a51caec6ef5428bf036ea32434a1a60f..dc69953796585dee98bbcbc08fcddaaf14abba62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-15  Sven Herzberg  <sven@imendio.com>
+
+       Use the g_test_*() API for this test
+       reviewed by: Richard Hult
+
+       * gdk/tests/check-gdk-cairo.c: use the g_test_*() API to permit adding
+       new tests
+
 2008-08-15  Sven Herzberg  <sven@imendio.com>
 
        Prepare for using the g_test_*() API
index 5a0307b989a07ff9fad6773166252c44ad5a8c7c..a89724e0c11ba17d5cca4694fc5083c9c9e8fd4d 100644 (file)
@@ -46,9 +46,8 @@ test (cairo_t* cr)
        cairo_stroke (cr);
 }
 
-int
-main (int   argc,
-      char**argv)
+static void
+test_pixmap_orientation (void)
 {
        GdkPixmap* pixmap;
        GdkPixbuf* pixbuf;
@@ -61,8 +60,6 @@ main (int   argc,
        guchar* data_imagesrf;
        guint i;
 
-       gdk_init (&argc, &argv);
-
        /* create "platform.png" via GdkPixmap */
        pixmap = gdk_pixmap_new (NULL /* drawable */, 100 /* w */, 80 /* h */, 24 /* d */);
        cr = gdk_cairo_create (pixmap);
@@ -133,7 +130,18 @@ main (int   argc,
 
        g_unlink ("gdksurface.png");
        g_unlink ("cairosurface.png");
+}
+
+int
+main (int   argc,
+      char**argv)
+{
+       g_test_init (&argc, &argv, NULL);
+       gdk_init (&argc, &argv);
+
+       g_test_add_func ("/gdk/pixmap/orientation",
+                        test_pixmap_orientation);
 
-       return 0;
+       return g_test_run ();
 }