Sha256: 01d5f2211f80692f210c996bd4201a28282023c08c0587ca94443e13830080ef

Contents?: true

Size: 862 Bytes

Versions: 30

Compression:

Stored size: 862 Bytes

Contents

require 'bitclust'
require 'test/unit'
require 'bitclust/libraryentry'

class TestLibraryEntry < Test::Unit::TestCase
  include BitClust

  def setup
    s = <<DOC
require hoge/bar
require hoge/baz
require hoge/bar

= class Hoge
== Class Methods
--- hoge
= class Bar < Hoge
== Class Methods
--- bar
= class Err < Exception
= class Err2 < Err
alias Err2Alias
DOC
    @lib_entry, @db = BitClust::RRDParser.parse(s, 'hoge')
    @sublibrary = LibraryEntry.new(@db, 'testsub')
  end

  def test_sublibrary
    @lib_entry.sublibrary(@sublibrary)
    assert_equal(['testsub'], @lib_entry.sublibraries.map(&:name))
    @lib_entry.sublibrary(@sublibrary)
    assert_equal(['testsub'], @lib_entry.sublibraries.map(&:name))
  end

  def test_error_classes
    assert_equal(["Err", "Err2", "Err2Alias"],
                 @lib_entry.error_classes.map(&:name).sort)
  end
end

Version data entries

30 entries across 26 versions & 1 rubygems

Version Path
bitclust-core-1.3.0 test/test_libraryentry.rb
bitclust-core-1.2.6 test/test_libraryentry.rb
bitclust-core-1.2.5 test/test_libraryentry.rb
bitclust-core-1.2.4 test/test_libraryentry.rb
bitclust-core-1.2.3 test/test_libraryentry.rb
bitclust-core-1.2.2 test/test_libraryentry.rb
bitclust-core-1.2.1 test/test_libraryentry.rb
bitclust-core-1.2.0 test/test_libraryentry.rb
bitclust-core-1.1.1 test/test_libraryentry.rb
bitclust-core-1.1.0 test/test_libraryentry.rb
bitclust-core-1.0.0 test/test_libraryentry.rb
bitclust-core-0.9.6 test/test_libraryentry.rb
bitclust-core-0.9.5 test/test_libraryentry.rb
bitclust-core-0.9.4 test/test_libraryentry.rb
bitclust-core-0.9.3 test/test_libraryentry.rb
bitclust-core-0.9.2 test/test_libraryentry.rb
bitclust-core-0.9.1 test/test_libraryentry.rb
bitclust-core-0.9.0 test/test_libraryentry.rb
bitclust-core-0.8.0 test/test_libraryentry.rb
bitclust-core-0.7.0 test/test_libraryentry.rb