Sha256: 8593b267eb611aa46cbf26658215f7b7ed255676a70d665e3a89debd42beede2

Contents?: true

Size: 840 Bytes

Versions: 24

Compression:

Stored size: 840 Bytes

Contents

require 'test/unit'

require 'rd/inline-element'
require 'rd/document-struct'
require 'dummy'

include RD

DummyStruct.define_relationship(NonterminalInline, DummyElement)

class TestNonterminalInline < Test::Unit::TestCase
  def test_children
    el = NonterminalInline.new
    assert_equal([], el.children)
    el.children.push 1
    assert_equal([1], el.children)
  end

  def test_to_label
    one = NonterminalInline.new
    one.add_child_under_document_struct(DummyElement.new, DummyStruct)
    assert_equal("label", one.to_label)

    two = NonterminalInline.new
    two.add_child_under_document_struct(DummyElement.new, DummyStruct)
    two.add_child_under_document_struct(DummyElement.new, DummyStruct)
    assert_equal("label  label", two.to_label)

    zero = NonterminalInline.new
    assert_equal("", zero.to_label)
  end
end

Version data entries

24 entries across 23 versions & 2 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/test/test-nonterminal-inline.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/test/test-nonterminal-inline.rb
rdtool-0.6.38 test/test-nonterminal-inline.rb
rdtool-0.6.37 test/test-nonterminal-inline.rb
rdtool-0.6.36 test/test-nonterminal-inline.rb
rdtool-0.6.35 test/test-nonterminal-inline.rb
rdtool-0.6.34 test/test-nonterminal-inline.rb
rdtool-0.6.33 test/test-nonterminal-inline.rb
rdtool-0.6.32 test/test-nonterminal-inline.rb
rdtool-0.6.31 test/test-nonterminal-inline.rb
rdtool-0.6.30 test/test-nonterminal-inline.rb
rdtool-0.6.29 test/test-nonterminal-inline.rb
rdtool-0.6.28 test/test-nonterminal-inline.rb