[gtk/wip/baedert/nodeeditor: 5/21] testsuite: Add a broken test



commit 5b6c9f643839b076e948a18ff3264a5664dd0f69
Author: Benjamin Otte <otte redhat com>
Date:   Thu Mar 21 06:47:36 2019 +0100

    testsuite: Add a broken test
    
    This also adds some build magic so all tests that contain "-3d" in them
    won't be added to the Cairo renderer.
    
    Of course, this new test is such a test.

 testsuite/gsk/compare/clip-coordinates-3d.node |  19 +++++++++++++++++++
 testsuite/gsk/compare/clip-coordinates-3d.png  | Bin 0 -> 269 bytes
 testsuite/gsk/meson.build                      |  15 ++++++++++-----
 3 files changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/testsuite/gsk/compare/clip-coordinates-3d.node b/testsuite/gsk/compare/clip-coordinates-3d.node
new file mode 100644
index 0000000000..6b417ef16a
--- /dev/null
+++ b/testsuite/gsk/compare/clip-coordinates-3d.node
@@ -0,0 +1,19 @@
+transform {
+  /* adding the perspective line here turns the matrix from a 2D
+     category into a 3D category. It does not have any visual effect. */
+  transform: perspective(200) scale(2);
+  child: container {
+    color {
+      bounds: 0 0 50 50;
+      color: transparent;
+    }
+
+    clip {
+      clip: 10 10 30 30;
+      child: color {
+        bounds: 0 0 50 50;
+        color: red;
+      }
+    }
+  }
+}
diff --git a/testsuite/gsk/compare/clip-coordinates-3d.png b/testsuite/gsk/compare/clip-coordinates-3d.png
new file mode 100644
index 0000000000..1da0014351
Binary files /dev/null and b/testsuite/gsk/compare/clip-coordinates-3d.png differ
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index e9fd913764..7f581931d1 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -66,6 +66,7 @@ foreach gl_test : gl_tests
 endforeach
 
 compare_render_tests = [
+  'clip-coordinates-3d',
   'clipped_rounded_clip',
   'opacity_clip',
   'outset_shadow_offset_both',
@@ -76,13 +77,17 @@ compare_render_tests = [
 ]
 
 renderers = [
-  'opengl',
-  'cairo',
+  # name      exclude term
+  [ 'opengl', ''    ],
+  [ 'cairo',  '-3d' ],
 ]
 
 foreach renderer : renderers
   foreach test : compare_render_tests
-    test(renderer + ' ' + test, compare_render,
+    if (renderer[1] != '' and test.contains(renderer[1]))
+      continue
+    endif
+    test(renderer[0] + ' ' + test, compare_render,
          args: [join_paths(meson.current_source_dir(), 'compare', test + '.node'),
                 join_paths(meson.current_source_dir(), 'compare', test + '.png')],
          env: [ 'GIO_USE_VOLUME_MONITOR=unix',
@@ -91,9 +96,9 @@ foreach renderer : renderers
                 'G_ENABLE_DIAGNOSTIC=0',
                 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
                 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
-                'GSK_RENDERER=' + renderer
+                'GSK_RENDERER=' + renderer[0]
               ],
-       suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer, 'gsk-compare-' + renderer ])
+       suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer[0], 'gsk-compare-' + renderer[0] ])
   endforeach
 endforeach
 


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