[BioRuby-cvs] bioruby/test/unit/bio test_feature.rb,1.1,1.2

Mitsuteru C. Nakao nakao at pub.open-bio.org
Wed Nov 23 06:47:14 EST 2005


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

Modified Files:
	test_feature.rb 
Log Message:
* Fixed the order of arguments of assert_equal.


Index: test_feature.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_feature.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_feature.rb	24 Sep 2005 14:20:18 -0000	1.1
--- test_feature.rb	23 Nov 2005 11:47:12 -0000	1.2
***************
*** 39,47 ****
  
      def test_qualifier
!       assert_equal(@obj.qualifier, 'gene')
      end
  
      def test_value
!       assert_equal(@obj.value, 'CDS')
      end
    end
--- 39,47 ----
  
      def test_qualifier
!       assert_equal('gene', @obj.qualifier)
      end
  
      def test_value
!       assert_equal('CDS', @obj.value)
      end
    end
***************
*** 62,84 ****
  
      def test_feature
!       assert_equal(@obj.feature, "source")
      end
  
      def test_position
!       assert_equal(@obj.position, '1..615')
      end
  
      def test_qualifiers
!       assert_equal(@obj.qualifiers, [@qualifier])
      end
      
      def test_locations
!       assert_equal(@obj.locations.first.from, 1)
!       assert_equal(@obj.locations.first.to, 615)
      end
  
      def test_append_nil
        assert(@obj.append(nil))
!       assert_equal(@obj.qualifiers.size, 1)
      end
  
--- 62,84 ----
  
      def test_feature
!       assert_equal("source", @obj.feature)
      end
  
      def test_position
!       assert_equal('1..615', @obj.position)
      end
  
      def test_qualifiers
!       assert_equal([@qualifier], @obj.qualifiers)
      end
      
      def test_locations
!       assert_equal(1, @obj.locations.first.from)
!       assert_equal(615, @obj.locations.first.to)
      end
  
      def test_append_nil
        assert(@obj.append(nil))
!       assert_equal(1, @obj.qualifiers.size)
      end
  
***************
*** 86,95 ****
        qualifier = Bio::Feature::Qualifier.new('db_xref', 'taxon:3702')
        assert(@obj.append(qualifier))
!       assert_equal(@obj.qualifiers.last.qualifier, 'db_xref')
      end
  
      def test_each
        @obj.each do |qua| 
!         assert_equal(qua.value, 'Arabidopsis thaliana')
        end
      end
--- 86,95 ----
        qualifier = Bio::Feature::Qualifier.new('db_xref', 'taxon:3702')
        assert(@obj.append(qualifier))
!       assert_equal('db_xref', @obj.qualifiers.last.qualifier)
      end
  
      def test_each
        @obj.each do |qua| 
!         assert_equal('Arabidopsis thaliana', qua.value)
        end
      end
***************
*** 97,101 ****
      def test_assoc
        @obj.append(Bio::Feature::Qualifier.new("organism", "Arabidopsis thaliana"))
!       assert_equal(@obj.assoc, {"organism" => "Arabidopsis thaliana"})
      end
    end
--- 97,101 ----
      def test_assoc
        @obj.append(Bio::Feature::Qualifier.new("organism", "Arabidopsis thaliana"))
!       assert_equal({"organism" => "Arabidopsis thaliana"}, @obj.assoc)
      end
    end
***************
*** 107,126 ****
      
      def test_features
!       assert_equal(@obj.features.size, 1)
      end
  
      def test_append
        assert(@obj.append(Bio::Feature.new('gene', '1..615', [])))
!       assert_equal(@obj.features.size, 2)
      end
  
      def test_each
        @obj.each do |feature| 
!         assert_equal(feature.feature, 'gene')
        end
      end
  
      def test_arg # def [](*arg)
!       assert_equal(@obj[0].feature, 'gene')
      end
    end
--- 107,126 ----
      
      def test_features
!       assert_equal(1, @obj.features.size)
      end
  
      def test_append
        assert(@obj.append(Bio::Feature.new('gene', '1..615', [])))
!       assert_equal(2, @obj.features.size)
      end
  
      def test_each
        @obj.each do |feature| 
!         assert_equal('gene', feature.feature)
        end
      end
  
      def test_arg # def [](*arg)
!       assert_equal('gene', @obj[0].feature)
      end
    end



More information about the bioruby-cvs mailing list