From 16ee7dce5467b825619d0a811713b37449c566dc Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Fri, 29 Jul 2022 03:07:43 +0000 Subject: [PATCH] Add a test --- test/twobit_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/twobit_test.rb b/test/twobit_test.rb index 628650a..c77ca16 100644 --- a/test/twobit_test.rb +++ b/test/twobit_test.rb @@ -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