[gegl/meta-json: 11/18] meta-json: Add a trivial testcase



commit 49f6a779c2a3ba86735d42926772fcbb93d5ecf3
Author: Jon Nordby <jononor gmail com>
Date:   Sun Dec 28 22:53:02 2014 +0100

    meta-json: Add a trivial testcase

 operations/json/grey2.fbp        |    8 ++++
 operations/json/grey2.json       |   76 ++++++++++++++++++++++++++++++++++++++
 tests/compositions/grey-json.xml |   14 +++++++
 3 files changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/operations/json/grey2.fbp b/operations/json/grey2.fbp
new file mode 100644
index 0000000..9e0596b
--- /dev/null
+++ b/operations/json/grey2.fbp
@@ -0,0 +1,8 @@
+INPORT=in.INPUT:INPUT
+OUTPORT=out.OUTPUT:OUTPUT
+INPORT=g.SAMPLES:SAMPLES
+INPORT=g.ITERATIONS:ITERATIONS
+INPORT=tr.HEIGHT:HEIGHT
+INPORT=tr.WIDTH:WIDTH
+
+in(gegl/nop) OUTPUT -> INPUT g(gegl/c2g) OUTPUT -> INPUT tr(gegl/crop) OUTPUT -> INPUT out(gegl/nop)
diff --git a/operations/json/grey2.json b/operations/json/grey2.json
new file mode 100644
index 0000000..a2934a4
--- /dev/null
+++ b/operations/json/grey2.json
@@ -0,0 +1,76 @@
+{
+  "processes": {
+    "in": {
+      "component": "gegl/nop"
+    },
+    "g": {
+      "component": "gegl/c2g"
+    },
+    "tr": {
+      "component": "gegl/crop"
+    },
+    "out": {
+      "component": "gegl/nop"
+    }
+  },
+  "connections": [
+    {
+      "src": {
+        "process": "in",
+        "port": "output"
+      },
+      "tgt": {
+        "process": "g",
+        "port": "input"
+      }
+    },
+    {
+      "src": {
+        "process": "g",
+        "port": "output"
+      },
+      "tgt": {
+        "process": "tr",
+        "port": "input"
+      }
+    },
+    {
+      "src": {
+        "process": "tr",
+        "port": "output"
+      },
+      "tgt": {
+        "process": "out",
+        "port": "input"
+      }
+    }
+  ],
+  "inports": {
+    "input": {
+      "process": "in",
+      "port": "input"
+    },
+    "samples": {
+      "process": "g",
+      "port": "samples"
+    },
+    "iterations": {
+      "process": "g",
+      "port": "iterations"
+    },
+    "height": {
+      "process": "tr",
+      "port": "height"
+    },
+    "width": {
+      "process": "tr",
+      "port": "width"
+    }
+  },
+  "outports": {
+    "output": {
+      "process": "out",
+      "port": "output"
+    }
+  }
+}
diff --git a/tests/compositions/grey-json.xml b/tests/compositions/grey-json.xml
new file mode 100644
index 0000000..5968587
--- /dev/null
+++ b/tests/compositions/grey-json.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gegl>
+  <node operation='gegl:greyy'>
+    <params>
+      <param name='height'>200</param>
+      <param name='width'>100</param>
+    </params>
+  </node>
+  <node operation='gegl:load'>
+    <params>
+      <param name='path'>data/car-stack.png</param>
+    </params>
+  </node>
+</gegl>


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