[gtk/path-work-rebased: 49/121] Add a nodeparser tests for fill and stroke nodes




commit 50098ba75bcc418e762f52d909aece107957766a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 4 12:46:39 2021 -0500

    Add a nodeparser tests for fill and stroke nodes

 testsuite/gsk/meson.build                      |  4 ++++
 testsuite/gsk/nodeparser/empty-fill.node       |  1 +
 testsuite/gsk/nodeparser/empty-fill.ref.node   | 14 ++++++++++++++
 testsuite/gsk/nodeparser/empty-stroke.node     |  1 +
 testsuite/gsk/nodeparser/empty-stroke.ref.node | 16 ++++++++++++++++
 testsuite/gsk/nodeparser/fill.node             |  9 +++++++++
 testsuite/gsk/nodeparser/fill.ref.node         |  9 +++++++++
 testsuite/gsk/nodeparser/stroke.node           | 13 +++++++++++++
 testsuite/gsk/nodeparser/stroke.ref.node       | 14 ++++++++++++++
 9 files changed, 81 insertions(+)
---
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 0ec3debbf4..4aa7f2b2b2 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -157,6 +157,8 @@ node_parser_tests = [
   'empty-cross-fade.ref.node',
   'empty-debug.node',
   'empty-debug.ref.node',
+  'empty-fill.node',
+  'empty-fill.ref.node',
   'empty-inset-shadow.node',
   'empty-inset-shadow.ref.node',
   'empty-linear-gradient.node',
@@ -171,6 +173,8 @@ node_parser_tests = [
   'empty-rounded-clip.ref.node',
   'empty-shadow.node',
   'empty-shadow.ref.node',
+  'empty-stroke.node',
+  'empty-stroke.ref.node',
   'empty-text.node',
   'empty-text.ref.node',
   'empty-texture.node',
diff --git a/testsuite/gsk/nodeparser/empty-fill.node b/testsuite/gsk/nodeparser/empty-fill.node
new file mode 100644
index 0000000000..266c3c2455
--- /dev/null
+++ b/testsuite/gsk/nodeparser/empty-fill.node
@@ -0,0 +1 @@
+fill { }
diff --git a/testsuite/gsk/nodeparser/empty-fill.ref.node b/testsuite/gsk/nodeparser/empty-fill.ref.node
new file mode 100644
index 0000000000..5840c61804
--- /dev/null
+++ b/testsuite/gsk/nodeparser/empty-fill.ref.node
@@ -0,0 +1,14 @@
+fill {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "\
+M 25 0\
+L 39.694629669189453 45.225425720214844\
+L 1.2235870361328125 17.274574279785156\
+L 48.776412963867188 17.274574279785156\
+L 10.305368423461914 45.225425720214844\
+Z";
+  fill-rule: winding;
+}
diff --git a/testsuite/gsk/nodeparser/empty-stroke.node b/testsuite/gsk/nodeparser/empty-stroke.node
new file mode 100644
index 0000000000..e918806b1f
--- /dev/null
+++ b/testsuite/gsk/nodeparser/empty-stroke.node
@@ -0,0 +1 @@
+stroke { }
diff --git a/testsuite/gsk/nodeparser/empty-stroke.ref.node b/testsuite/gsk/nodeparser/empty-stroke.ref.node
new file mode 100644
index 0000000000..d49b2ce908
--- /dev/null
+++ b/testsuite/gsk/nodeparser/empty-stroke.ref.node
@@ -0,0 +1,16 @@
+stroke {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "\
+M 25 0\
+L 39.694629669189453 45.225425720214844\
+L 1.2235870361328125 17.274574279785156\
+L 48.776412963867188 17.274574279785156\
+L 10.305368423461914 45.225425720214844\
+Z";
+  line-width: 1;
+  line-cap: butt;
+  line-join: miter;
+}
diff --git a/testsuite/gsk/nodeparser/fill.node b/testsuite/gsk/nodeparser/fill.node
new file mode 100644
index 0000000000..912b4d53ee
--- /dev/null
+++ b/testsuite/gsk/nodeparser/fill.node
@@ -0,0 +1,9 @@
+
+fill {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "M 150 100 A 50 50 0 0 0 50 100 A 50 50 0 0 0 150 100 z";
+  fill-rule: even-odd;
+}
diff --git a/testsuite/gsk/nodeparser/fill.ref.node b/testsuite/gsk/nodeparser/fill.ref.node
new file mode 100644
index 0000000000..d0698b992b
--- /dev/null
+++ b/testsuite/gsk/nodeparser/fill.ref.node
@@ -0,0 +1,9 @@
+fill {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "\
+M 150 100 A 50 50 0 0 0 50 100 A 50 50 0 0 0 150 100 z";
+  fill-rule: even-odd;
+}
diff --git a/testsuite/gsk/nodeparser/stroke.node b/testsuite/gsk/nodeparser/stroke.node
new file mode 100644
index 0000000000..08381f92a3
--- /dev/null
+++ b/testsuite/gsk/nodeparser/stroke.node
@@ -0,0 +1,13 @@
+stroke {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "M 111 222 h 333 v 444 h -333 z";
+  line-width: 2.5;
+  line-cap: round;
+  line-join: miter-clip;
+  miter-limit: 5.0;
+  dash: 1 2 3 4 5;
+  dash-offset: 1.5;
+}
diff --git a/testsuite/gsk/nodeparser/stroke.ref.node b/testsuite/gsk/nodeparser/stroke.ref.node
new file mode 100644
index 0000000000..595cd0d47a
--- /dev/null
+++ b/testsuite/gsk/nodeparser/stroke.ref.node
@@ -0,0 +1,14 @@
+stroke {
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,204);
+  }
+  path: "\
+M 111 222 h 333 v 444 h -333 z";
+  line-width: 2.5;
+  line-cap: round;
+  line-join: miter-clip;
+  miter-limit: 5;
+  dash: 1 2 3 4 5;
+  dash-offset: 1.5;
+}


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