File: test_rgfa_segment_references.rb

package info (click to toggle)
ruby-rgfa 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 820 kB
  • ctags: 768
  • sloc: ruby: 5,649; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require "rgfa.rb"
require "test/unit"

class TestRGFASegmentReferences < Test::Unit::TestCase

  def test_link_other
    l = "L\t1\t+\t2\t-\t*".to_rgfa_line
    assert_equal(:"2", l.other(:"1"))
    assert_equal(:"1", l.other(:"2"))
    assert_raise(RGFA::LineMissingError){l.other(:"0")}
  end

  def test_link_circular
    l = "L\t1\t+\t2\t-\t*".to_rgfa_line
    assert_equal(false, l.circular?)
    l = "L\t1\t+\t1\t-\t*".to_rgfa_line
    assert_equal(true, l.circular?)
  end

end