[BioRuby-cvs] bioruby/test/unit/bio test_sequence.rb,1.4,1.5

Mitsuteru C. Nakao nakao at pub.open-bio.org
Sat Nov 26 01:51:47 EST 2005


Update of /home/repository/bioruby/bioruby/test/unit/bio
In directory pub.open-bio.org:/tmp/cvs-serv26954/test/unit/bio

Modified Files:
	test_sequence.rb 
Log Message:
* Added test_translate_[123456].
* Chaged test_nucleic_acid_names.


Index: test_sequence.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_sequence.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_sequence.rb	25 Sep 2005 05:17:53 -0000	1.4
--- test_sequence.rb	26 Nov 2005 06:51:45 -0000	1.5
***************
*** 258,262 ****
  
      def test_nucleic_acid_names
!       assert_equal(["adenine", "cytosine", "guanine", "thymine", "uracil"], Sequence::NA.new('acgtu').names)
      end
  
--- 258,264 ----
  
      def test_nucleic_acid_names
!       # It is a Bio::NucleicAcid feature.
!       #      assert_equal(["adenine", "cytosine", "guanine", "thymine", "uracil"], Sequence::NA.new('acgtu').names)
!       assert(Sequence::NA.new('acgtu').names)
      end
  
***************
*** 352,354 ****
--- 354,386 ----
      end
    end
+ 
+ 
+   class TestNATranslate < Test::Unit::TestCase
+     def setup
+       @obj = Bio::Sequence::NA.new("AAA")
+     end
+ 
+     def test_translate
+       assert_equal("K", @obj.translate)
+     end
+     def test_translate_1
+       assert_equal("K", @obj.translate(1))
+     end
+     def test_translate_2
+       assert_equal("", @obj.translate(2))
+     end
+     def test_translate_3
+       assert_equal("", @obj.translate(3))
+     end
+     def test_translate_4
+       assert_equal("F", @obj.translate(4))
+     end
+     def test_translate_5
+       assert_equal("", @obj.translate(5))
+     end
+     def test_translate_5
+       assert_equal("", @obj.translate(6))
+     end
+   end
+ 
  end



More information about the bioruby-cvs mailing list