[gtk/wip/baedert/nodeeditor: 7/21] Move working tests to new directory



commit e0f182500e42dddf007c025f94a0cbb51e383c44
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 19 08:16:07 2019 +0100

    Move working tests to new directory
    
    These are tests that are working on both GL and Cairo now.
    
    Some tests got black boxes over the areas that aren't easy to compare.

 testsuite/gsk/compare/clipped_rounded_clip.node    |  41 +++++++++++++++++++++
 testsuite/gsk/compare/clipped_rounded_clip.png     | Bin 0 -> 3162 bytes
 testsuite/gsk/compare/opacity_clip.node            |  36 ++++++++++++++++++
 testsuite/gsk/compare/opacity_clip.png             | Bin 0 -> 1913 bytes
 .../outset_shadow_offset_both.node}                |   0
 .../outset_shadow_offset_both.png}                 | Bin
 .../outset_shadow_offset_x.node}                   |   0
 .../outset_shadow_offset_x.png}                    | Bin
 .../outset_shadow_offset_y.node}                   |   0
 .../outset_shadow_offset_y.png}                    | Bin
 .../outset_shadow_rounded_top.node}                |   0
 .../outset_shadow_rounded_top.png}                 | Bin
 .../outset_shadow_simple.node}                     |   0
 .../outset_shadow_simple.png}                      | Bin
 testsuite/gsk/gl/clipped_rounded_clip.gl.png       | Bin 613 -> 0 bytes
 testsuite/gsk/gl/clipped_rounded_clip.txt          |  10 -----
 testsuite/gsk/gl/opacity_clip.gl.png               | Bin 543 -> 0 bytes
 testsuite/gsk/gl/opacity_clip.txt                  |  13 -------
 testsuite/gsk/meson.build                          |  39 ++++++++++++++++----
 19 files changed, 109 insertions(+), 30 deletions(-)
---
diff --git a/testsuite/gsk/compare/clipped_rounded_clip.node b/testsuite/gsk/compare/clipped_rounded_clip.node
new file mode 100644
index 0000000000..5d4aa2bf68
--- /dev/null
+++ b/testsuite/gsk/compare/clipped_rounded_clip.node
@@ -0,0 +1,41 @@
+color {
+  color: white;
+  bounds: 50 70 80 90;
+}
+
+clip {
+  clip: 60 80 60 70;
+  child: rounded-clip {
+    clip: 20 50 100 100 / 50;
+    child: color {
+      bounds: 20 50 100 100;
+      color: red;
+    }
+  }
+}
+
+debug {
+  message: "clipped out area";
+  child: container {
+    color {
+      bounds: 115 80 5 45;
+      color: black;
+    }
+    color {
+      bounds: 110 122 5 11;
+      color: black;
+    }
+    color {
+      bounds: 100 130 10 10;
+      color: black;
+    }
+    color {
+      bounds: 91 140 11 5;
+      color: black;
+    }
+    color {
+      bounds: 60 145 35 5;
+      color: black;
+    }
+  }
+}
\ No newline at end of file
diff --git a/testsuite/gsk/compare/clipped_rounded_clip.png b/testsuite/gsk/compare/clipped_rounded_clip.png
new file mode 100644
index 0000000000..d8b69cf1c8
Binary files /dev/null and b/testsuite/gsk/compare/clipped_rounded_clip.png differ
diff --git a/testsuite/gsk/compare/opacity_clip.node b/testsuite/gsk/compare/opacity_clip.node
new file mode 100644
index 0000000000..443b1e9fd6
--- /dev/null
+++ b/testsuite/gsk/compare/opacity_clip.node
@@ -0,0 +1,36 @@
+color {
+  bounds: 40 40 70 70;
+  color: transparent;
+}
+
+clip {
+  clip: 50 50 50 50;
+  child: opacity {
+    opacity: 0.4;
+    child: rounded-clip {
+      clip: 50 50 100 100 / 50;
+      child: color {
+        bounds: 50 50 100 100;
+        color: red;
+      }
+    }
+  }
+}
+
+debug {
+  message: "clipped out area";
+  child: container {
+    color {
+      bounds: 50 70 10 30;
+      color: black;
+    }
+    color {
+      bounds: 55 55 20 20;
+      color: black;
+    }
+    color {
+      bounds: 70 50 30 10;
+      color: black;
+    }
+  }
+}
diff --git a/testsuite/gsk/compare/opacity_clip.png b/testsuite/gsk/compare/opacity_clip.png
new file mode 100644
index 0000000000..f64cab7230
Binary files /dev/null and b/testsuite/gsk/compare/opacity_clip.png differ
diff --git a/testsuite/gsk/gl/outset_shadow_offset_both.txt 
b/testsuite/gsk/compare/outset_shadow_offset_both.node
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offset_both.txt
rename to testsuite/gsk/compare/outset_shadow_offset_both.node
diff --git a/testsuite/gsk/gl/outset_shadow_offset_both.gl.png 
b/testsuite/gsk/compare/outset_shadow_offset_both.png
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offset_both.gl.png
rename to testsuite/gsk/compare/outset_shadow_offset_both.png
diff --git a/testsuite/gsk/gl/outset_shadow_offsetx.txt b/testsuite/gsk/compare/outset_shadow_offset_x.node
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offsetx.txt
rename to testsuite/gsk/compare/outset_shadow_offset_x.node
diff --git a/testsuite/gsk/gl/outset_shadow_offsetx.gl.png b/testsuite/gsk/compare/outset_shadow_offset_x.png
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offsetx.gl.png
rename to testsuite/gsk/compare/outset_shadow_offset_x.png
diff --git a/testsuite/gsk/gl/outset_shadow_offsety.txt b/testsuite/gsk/compare/outset_shadow_offset_y.node
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offsety.txt
rename to testsuite/gsk/compare/outset_shadow_offset_y.node
diff --git a/testsuite/gsk/gl/outset_shadow_offsety.gl.png b/testsuite/gsk/compare/outset_shadow_offset_y.png
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_offsety.gl.png
rename to testsuite/gsk/compare/outset_shadow_offset_y.png
diff --git a/testsuite/gsk/gl/outset_shadow_rounded_top.txt 
b/testsuite/gsk/compare/outset_shadow_rounded_top.node
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_rounded_top.txt
rename to testsuite/gsk/compare/outset_shadow_rounded_top.node
diff --git a/testsuite/gsk/gl/outset_shadow_rounded_top.gl.png 
b/testsuite/gsk/compare/outset_shadow_rounded_top.png
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_rounded_top.gl.png
rename to testsuite/gsk/compare/outset_shadow_rounded_top.png
diff --git a/testsuite/gsk/gl/outset_shadow_simple.txt b/testsuite/gsk/compare/outset_shadow_simple.node
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_simple.txt
rename to testsuite/gsk/compare/outset_shadow_simple.node
diff --git a/testsuite/gsk/gl/outset_shadow_simple.gl.png b/testsuite/gsk/compare/outset_shadow_simple.png
similarity index 100%
rename from testsuite/gsk/gl/outset_shadow_simple.gl.png
rename to testsuite/gsk/compare/outset_shadow_simple.png
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 6b74e1c144..e9fd913764 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -40,21 +40,14 @@ test('nodes (cairo)', test_render_nodes,
 
 # Interesting render nodes proven to be rendered 'correctly' by the GL renderer.
 gl_tests = [
-  ['outset shadow simple',         'outset_shadow_simple'],
-  ['outset shadow offset x',       'outset_shadow_offsetx'],
-  ['outset shadow offset y',       'outset_shadow_offsety'],
-  ['outset shadow offset both',    'outset_shadow_offset_both'],
   ['outset shadow rounded1',       'outset_shadow_rounded1'],
   ['outset shadow rounded2',       'outset_shadow_rounded2'],
-  ['outset shadow rounded top',    'outset_shadow_rounded_top'],
   ['outset shadow blurred simple', 'outset_shadow_blurred_simple'],
   ['outset shadow blurred small',  'outset_shadow_blurred_small'],
   ['outset shadow blurred offset', 'outset_shadow_blurred_offset'],
   ['Crossfade simple',             'cross_fade'],
-  ['Clipped rounded clip',         'clipped_rounded_clip'],
   ['gradient simple',              'gradient_simple'],
   ['gradient clipped',             'gradient_clipped'],
-  ['offscreen opacity',            'opacity_clip'],
 ]
 
 foreach gl_test : gl_tests
@@ -72,6 +65,38 @@ foreach gl_test : gl_tests
        suite: 'gsk')
 endforeach
 
+compare_render_tests = [
+  'clipped_rounded_clip',
+  'opacity_clip',
+  'outset_shadow_offset_both',
+  'outset_shadow_offset_x',
+  'outset_shadow_offset_y',
+  'outset_shadow_rounded_top',
+  'outset_shadow_simple',
+]
+
+renderers = [
+  'opengl',
+  'cairo',
+]
+
+foreach renderer : renderers
+  foreach test : compare_render_tests
+    test(renderer + ' ' + 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',
+                'GSETTINGS_BACKEND=memory',
+                'GTK_CSD=1',
+                '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
+              ],
+       suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer, 'gsk-compare-' + renderer ])
+  endforeach
+endforeach
+
 node_parser_tests = [
   'crash1',
   'crash2',


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