Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Jul 29, 2022
1 parent 9f83700 commit 16ee7dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/twobit_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ def foo_closed
foo.bases("chr1"))
assert_equal({ "A" => 0.12, "C" => 0.12, "T" => 0.12, "G" => 0.12 },
foo.bases("chr1", 24, 74))
assert_equal({ "A" => 0.2, "C" => 0.2, "T" => 0.3, "G" => 0.3 },
foo.bases("chr2", 10, 20))
assert_equal({ "A" => 6, "C" => 6, "T" => 6, "G" => 7 },
foo.bases("chr1", 24, 75, fraction: false))
assert_equal({ "A" => 0.2, "C" => 0.2, "T" => 0.3, "G" => 0.3 },
foo.bases("chr2", 10, 20))
assert_equal({ "A" => 2, "C" => 2, "T" => 3, "G" => 3 },
foo.bases("chr2", 10, 20, fraction: false))
assert_raise { foo_closed.bases("chr1") }
assert_raise(ArgumentError) { foo.bases("chr1", 0, -1) }
end
Expand Down

0 comments on commit 16ee7dc

Please sign in to comment.