]> granicus.if.org Git - graphviz/commitdiff
automake magic and test case cleanup
authorellson <devnull@localhost>
Fri, 22 Jul 2005 01:08:57 +0000 (01:08 +0000)
committerellson <devnull@localhost>
Fri, 22 Jul 2005 01:08:57 +0000 (01:08 +0000)
tclpkg/gv/test.java [new file with mode: 0644]
tclpkg/gv/test.php [new file with mode: 0644]
tclpkg/gv/test.pl [new file with mode: 0644]
tclpkg/gv/test.py [new file with mode: 0644]
tclpkg/gv/test.rb [new file with mode: 0644]
tclpkg/gv/test.tcl [new file with mode: 0644]

diff --git a/tclpkg/gv/test.java b/tclpkg/gv/test.java
new file mode 100644 (file)
index 0000000..baa07ea
--- /dev/null
@@ -0,0 +1,39 @@
+// test.java
+
+public class test {
+    static {
+       System.loadLibrary("gv");
+    }
+
+    public static void main(String[] args) {
+       SWIGTYPE_p_Agraph_t g, sg;
+       SWIGTYPE_p_Agnode_t n, m;
+       SWIGTYPE_p_Agedge_t e;
+
+       g = gv.digraph("G");
+       System.out.println(gv.set(g,"aaa","xxx"));
+       System.out.println(gv.set(g,"aaa"));
+       sg = gv.graph(g,"SG");
+       n = gv.node(g,"hello");
+       System.out.println(gv.set(n,"label"));
+       System.out.println(gv.set(n,"aaa","xxx"));
+       System.out.println(gv.set(n,"aaa"));
+       m = gv.node(g,"world");
+        System.out.println(gv.set(m,"aaa"));
+       e = gv.edge(n,m);
+       System.out.println(gv.set(e,"aaa","xxx"));
+        System.out.println(gv.set(e,"aaa"));
+       gv.rm(e);
+       gv.rm(n);
+       gv.rm(m);
+       gv.rm(g);
+
+       g = gv.stringgraph("digraph G {a->b}");
+       gv.rm(g);
+
+       g = gv.readgraph("../hello.dot");
+       gv.layout(g,"dot");
+       gv.writegraph(g,"hello.png","png");
+       gv.rm(g);
+    }
+}
diff --git a/tclpkg/gv/test.php b/tclpkg/gv/test.php
new file mode 100644 (file)
index 0000000..d06a68c
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/php
+
+dl("libgv_php.so");
+include("gv.php")
+
+$g = Gv::digraph "G";
+
+#print gv::set($g, "aaa", "xxx"), "\n";
+#print gv::set($g, "aaa"), "\n";
+#$n = gv::node $g, "hello";
+#print gv::set($n,"label"), "\n";
+#print gv::set($n, "aaa", "xxx"), "\n";
+#print gv::set($n, "aaa"), "\n";
+#$m = gv::node $g, "world";
+#print gv::set($m, "aaa"), "\n";
+#$e = gv::edge $n, $m;
+#print gv::set($e, "aaa", "xxx"), "\n";
+#print gv::set($e, "aaa"), "\n";
+#gv::rm $e;
+#gv::rm $n;
+#gv::rm $m;
+#gv::rm $g;
+#
+#$g = gv::stringgraph "digraph G {a->b}";
+#gv::rm $g;
+#
+#$g = gv::readgraph "../hello.dot";
+#gv::layout($g, "dot");
+#gv::writegraph($g, "hello.png", "png");
+#gv::rm $g;
diff --git a/tclpkg/gv/test.pl b/tclpkg/gv/test.pl
new file mode 100644 (file)
index 0000000..483587e
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use gv;
+
+$g = gv::digraph "G";
+print gv::set($g, "aaa", "xxx"), "\n";
+print gv::set($g, "aaa"), "\n";
+$n = gv::node $g, "hello";
+print gv::set($n,"label"), "\n";
+print gv::set($n, "aaa", "xxx"), "\n";
+print gv::set($n, "aaa"), "\n";
+$m = gv::node $g, "world";
+print gv::set($m, "aaa"), "\n";
+$e = gv::edge $n, $m;
+print gv::set($e, "aaa", "xxx"), "\n";
+print gv::set($e, "aaa"), "\n";
+gv::rm $e;
+gv::rm $n;
+gv::rm $m;
+gv::rm $g;
+
+$g = gv::stringgraph "digraph G {a->b}";
+gv::rm $g;
+
+$g = gv::readgraph "../hello.dot";
+gv::layout($g, "dot");
+gv::writegraph($g, "hello.png", "png");
+gv::rm $g;
diff --git a/tclpkg/gv/test.py b/tclpkg/gv/test.py
new file mode 100644 (file)
index 0000000..0e77601
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import gv
+
+g = gv.digraph("G")
+print gv.set(g,"aaa","xxx")
+print gv.set(g,"aaa")
+n = gv.node(g,"hello")
+print gv.set(n,"label")
+print gv.set(n,"aaa","xxx")
+print gv.set(n,"aaa")
+m = gv.node(g,"world")
+print gv.set(m,"aaa")
+e = gv.edge(n,m)
+print gv.set(e,"aaa","xxx")
+print gv.set(e,"aaa")
+gv.rm(e)
+gv.rm(m)
+gv.rm(n)
+gv.rm(g)
+
+g = gv.stringgraph("digraph G {a->b}")
+gv.rm(g)
+
+g = gv.readgraph("../hello.dot")
+gv.layout(g, "dot")
+gv.writegraph(g, "hello.png", "png")
+gv.rm(g)
diff --git a/tclpkg/gv/test.rb b/tclpkg/gv/test.rb
new file mode 100644 (file)
index 0000000..533ea65
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/ruby
+
+require 'gv'
+
+g = Gv.digraph("G")
+print(Gv::set(g, "aaa", "xxx"), "\n")
+print(Gv::set(g, "aaa"), "\n")
+n = Gv.node(g,"hello")
+print(Gv::set(n, "label"), "\n")
+print(Gv::set(n, "aaa", "xxx"), "\n")
+print(Gv::set(n, "aaa"), "\n")
+m = Gv.node(g,"world")
+print(Gv::set(m, "aaa"), "\n")
+e = Gv.edge(n,m)
+print(Gv::set(e, "aaa", "xxx"), "\n")
+print(Gv::set(e, "aaa"), "\n")
+Gv.rm(e)
+Gv.rm(n)
+Gv.rm(m)
+Gv.rm(g)
+
+g = Gv.stringgraph("digraph G {a->b}")
+Gv.rm(g)
+
+g = Gv.readgraph("../hello.dot")
+Gv.layout(g, "dot")
+Gv.writegraph(g, "hello.png", "png")
+Gv.rm(g)
diff --git a/tclpkg/gv/test.tcl b/tclpkg/gv/test.tcl
new file mode 100644 (file)
index 0000000..d49098a
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/tclsh
+
+load libgv_tcl.so gv
+
+set g [gv::digraph G]
+puts [gv::set $g aaa xxx]
+puts [gv::set $g aaa]
+set sg [gv::graph $g SG]
+set n [gv::node $g hello]
+puts [gv::set $n label]
+puts [gv::set $n aaa xxx]
+puts [gv::set $n aaa]
+set m [gv::node $g world]
+puts [gv::set $m aaa]
+set e [gv::edge $n $m]
+puts [gv::set $e aaa xxx]
+puts [gv::set $e aaa]
+gv::rm $e
+gv::rm $n
+gv::rm $m
+gv::rm $g
+
+set g [gv::stringgraph "digraph G {a->b}"]
+gv::rm $g
+
+set g [gv::readgraph ../hello.dot]
+gv::layout $g dot
+gv::writegraph $g hello.png png