[BioRuby-cvs] bioruby/test/unit/bio/data test_aa.rb, 1.3, 1.4 test_codontable.rb, 1.3, 1.4 test_na.rb, 1.3, 1.4

Mitsuteru C. Nakao nakao at pub.open-bio.org
Wed Nov 23 00:25:12 EST 2005


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

Modified Files:
	test_aa.rb test_codontable.rb test_na.rb 
Log Message:
* Updated test codes for constants renamed UPPERCASE.


Index: test_codontable.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_codontable.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_codontable.rb	23 Nov 2005 05:10:34 -0000	1.3
--- test_codontable.rb	23 Nov 2005 05:25:10 -0000	1.4
***************
*** 30,33 ****
--- 30,55 ----
  
  module Bio
+   class TestCodonTableConstants < Test::Unit::TestCase
+     def test_Definitions
+       assert(Bio::CodonTable::DEFINITIONS)
+       assert(Bio::CodonTable::DEFINITIONS[1], "Standard (Eukaryote)")
+     end
+ 
+     def test_Starts
+       assert(Bio::CodonTable::STARTS)
+       assert_equal(['ttg', 'ctg', 'atg', 'gtg'], Bio::CodonTable::STARTS[1])
+     end
+ 
+     def test_stops
+       assert(Bio::CodonTable::STOPS)
+       assert_equal(['taa', 'tag', 'tga'], Bio::CodonTable::STOPS[1])
+     end
+ 
+     def test_Tables
+       assert(Bio::CodonTable::TABLES)
+     end
+   end
+ 
+ 
    class TestCodonTable < Test::Unit::TestCase
      
***************
*** 90,111 ****
      end
  
-     def test_Definitions
-       assert(Bio::CodonTable::Definitions)
-       assert(Bio::CodonTable::Definitions[1], "Standard (Eukaryote)")
-     end
- 
-     def test_Starts
-       assert(Bio::CodonTable::Starts)
-       assert_equal(['ttg', 'ctg', 'atg', 'gtg'], Bio::CodonTable::Starts[1])
-     end
- 
-     def test_stops
-       assert(Bio::CodonTable::Stops)
-       assert_equal(['taa', 'tag', 'tga'], Bio::CodonTable::Stops[1])
-     end
  
      def test_Tables
!       assert(Bio::CodonTable::Tables)
!       assert_equal(@ct.table, Bio::CodonTable::Tables[1])
      end
  
--- 112,118 ----
      end
  
  
      def test_Tables
!       assert_equal(@ct.table, Bio::CodonTable::TABLES[1])
      end
  

Index: test_na.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_na.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_na.rb	23 Nov 2005 05:10:34 -0000	1.3
--- test_na.rb	23 Nov 2005 05:25:10 -0000	1.4
***************
*** 29,34 ****
  
  module Bio
-   class TestNA < Test::Unit::TestCase
  
      def setup
        @obj = Bio::NucleicAcid.new
--- 29,51 ----
  
  module Bio
  
+   class TestNAConstants  < Test::Unit::TestCase
+     def test_NAMES
+       assert_equal('a', Bio::NucleicAcid::NAMES['a'])
+     end
+ 
+     def test_NAMES_1_to_name
+       assert_equal('adenine', Bio::NucleicAcid::NAMES['A'])
+     end
+ 
+     def test_WEIGHT
+       mw = 135.15
+       assert_equal(mw, Bio::NucleicAcid::WEIGHT['a'])
+       assert_equal(mw, Bio::NucleicAcid::WEIGHT[:adenine])
+     end
+   end
+ 
+ 
+   class TestNA < Test::Unit::TestCase
      def setup
        @obj = Bio::NucleicAcid.new
***************
*** 41,56 ****
      end
  
-     def test_Names
-       assert_equal('a', Bio::NucleicAcid::Names['a'])
-     end
-     def test_Names_1_to_name
-       assert_equal('adenine', Bio::NucleicAcid::Names['A'])
-     end
- 
-     def test_Weight
-       mw = 135.15
-       assert_equal(mw, Bio::NucleicAcid::Weight['a'])
-       assert_equal(mw, Bio::NucleicAcid::Weight[:adenine])
-     end
  
      def test_weight
--- 58,61 ----
***************
*** 72,79 ****
      
      def test_names
!       assert_equal(Bio::NucleicAcid::Names, @obj.names)
      end
      def test_na
!       assert_equal(Bio::NucleicAcid::Names, @obj.na)
      end
  
--- 77,84 ----
      
      def test_names
!       assert_equal(Bio::NucleicAcid::NAMES, @obj.names)
      end
      def test_na
!       assert_equal(Bio::NucleicAcid::NAMES, @obj.na)
      end
  

Index: test_aa.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_aa.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_aa.rb	23 Nov 2005 05:10:34 -0000	1.3
--- test_aa.rb	23 Nov 2005 05:25:10 -0000	1.4
***************
*** 29,40 ****
  
  module Bio
!   class TestAA < Test::Unit::TestCase
  
      def setup
        @obj = Bio::AminoAcid.new
-     end
- 
-     def test_bio_aminoacid
-       assert_equal('Ala', Bio::AminoAcid['A'])
      end
  
--- 29,42 ----
  
  module Bio
!   class TestAAConstants < Test::Unit::TestCase
!     def test_bio_aminoacid
!       assert_equal('Ala', Bio::AminoAcid['A'])
!     end
!   end
  
+ 
+   class TestAA < Test::Unit::TestCase
      def setup
        @obj = Bio::AminoAcid.new
      end
  



More information about the bioruby-cvs mailing list