[gegl] tests: add test setting nonexisting op



commit 3961627aefbb2875dc9425c27edc0866d0fb4c40
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Aug 8 21:06:29 2017 +0200

    tests: add test setting nonexisting op

 tests/simple/test-node-properties.c |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/tests/simple/test-node-properties.c b/tests/simple/test-node-properties.c
index 3a72def..f098856 100644
--- a/tests/simple/test-node-properties.c
+++ b/tests/simple/test-node-properties.c
@@ -95,6 +95,19 @@ int main(int argc, char *argv[])
       printf ("x, y: %f, %f\n", x, y);
       goto abort;
     }
+
+  gegl_node_set (node,
+                 "operation", "gegl:doesnt-exist",
+                 NULL);
+
+  gegl_node_get (node, "operation", &name, NULL);
+  
+  if (!(!strcmp (name, "gegl:nop")))
+    {
+      result = FAILURE;
+      printf ("operation: %s\n", name); 
+      goto abort;
+    }
   
   gegl_node_set (node,
                  "operation", "gegl:nop",
@@ -109,6 +122,8 @@ int main(int argc, char *argv[])
       goto abort;
     }
 
+
+
   gegl_node_set (node,
                  "operation", "gegl:translate",
                  NULL);
@@ -143,16 +158,16 @@ int main(int argc, char *argv[])
         cache == FALSE))
     {
       result = FAILURE;
-      printf ("name:  %s\n", name); 
+      printf ("name:  %s\n", name);
       printf ("cache: %d\n", cache); 
       goto abort;
     }
-  
+
   gegl_node_set (node,
                  "dont-cache", TRUE,
                  "name", "Steve",
                  NULL);
-  
+
   gegl_node_get (node,
                  "name", &name,
                  "dont-cache", &cache,
@@ -162,8 +177,8 @@ int main(int argc, char *argv[])
         cache == TRUE))
     {
       result = FAILURE;
-      printf ("name: %s\n", name); 
-      printf ("cache: %d\n", cache); 
+      printf ("name: %s\n", name);
+      printf ("cache: %d\n", cache);
       goto abort;
     }
 


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