File: test_subgraph.rb

package info (click to toggle)
ruby-graphviz 1.0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,124 kB
  • ctags: 695
  • sloc: ruby: 7,656; xml: 26; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'test/unit'
$:.unshift(File.expand_path('../../lib',__FILE__))
require 'graphviz'

class GraphVizSubGraphTest < Test::Unit::TestCase
  def test_subgraph
    master1 = GraphViz::new(:G)
    cl1 = master1.add_graph('cluster_cl1')

    master2 = GraphViz::new(:G)
    cl2 = GraphViz::new('cluster_cl1')
    master2.add_graph cl2

    assert_equal(master1.to_s, master2.to_s, "Wrong subgraph")
  end
end