Add infinite loop test
authorSøren Sandmann <sandmann@redhat.com>
Mon, 9 Jun 2008 04:51:28 +0000 (00:51 -0400)
committerSøren Sandmann <sandmann@redhat.com>
Mon, 9 Jun 2008 04:51:28 +0000 (00:51 -0400)
test/Makefile.am
test/region-test.c [new file with mode: 0644]

index d0a21c4..ced0579 100644 (file)
@@ -2,6 +2,7 @@ if HAVE_GTK
 TESTPROGRAMS = \
        composite-test          \
        gradient-test           \
+       region-test             \
        fetch-test
 
 noinst_PROGRAMS = $(TESTPROGRAMS)
@@ -11,5 +12,6 @@ INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS)
 composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
 gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
 fetch_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
+region_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
 
 endif
diff --git a/test/region-test.c b/test/region-test.c
new file mode 100644 (file)
index 0000000..15c204b
--- /dev/null
@@ -0,0 +1,22 @@
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "pixman.h"
+
+/* This seems to go into an infinite loop
+ */
+int
+main ()
+{
+    pixman_region32_t r1;
+    pixman_region32_t r2;
+    pixman_region32_t r3;
+
+    pixman_region32_init_rect (&r1, 0, 0, 20, 64000);
+    pixman_region32_init_rect (&r2, 0, 0, 20, 64000);
+    pixman_region32_init_rect (&r3, 0, 0, 20, 64000);
+
+    pixman_region32_subtract (&r1, &r2, &r3);
+
+}
+