class TestDotPort
Tests for DOT::Port
Public Instance Methods
test_label()
click to toggle source
# File test/rdot_test.rb, line 32 def test_label port = DOT::Port.new(nil, 'test_label') assert_equal('test_label', port.to_s) end
test_name()
click to toggle source
# File test/rdot_test.rb, line 24 def test_name port = DOT::Port.new() assert_equal('', port.to_s) port = DOT::Port.new('test_name') assert_equal('<test_name>', port.to_s) end
test_name_and_label()
click to toggle source
# File test/rdot_test.rb, line 37 def test_name_and_label port = DOT::Port.new('test_name', 'test_label') assert_equal('<test_name> test_label', port.to_s) end
test_name_label_and_nested_ports()
click to toggle source
# File test/rdot_test.rb, line 47 def test_name_label_and_nested_ports port = DOT::Port.new('test_name', 'test_label') port.ports = [DOT::Port.new(nil, 'a'), DOT::Port.new(nil, 'b')] assert_equal('{a | b}', port.to_s) end
test_nested_ports()
click to toggle source
# File test/rdot_test.rb, line 42 def test_nested_ports port = DOT::Port.new([DOT::Port.new(nil, 'a'), DOT::Port.new(nil, 'b')]) assert_equal('{a | b}', port.to_s) end