[BioRuby-cvs] bioruby/test/unit/bio/db test_aaindex.rb,1.2,1.3

Mitsuteru C. Nakao nakao at pub.open-bio.org
Wed Feb 22 07:35:21 UTC 2006


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

Modified Files:
	test_aaindex.rb 
Log Message:
* aaindex.rb: Added Bio::AAindex2#[](aa1, aa2) method for accessing the 
              value in the matrix.
              Changed arguments of Bio::AAindex2#matrix(aa1 = nil, aa1 = nil) 
              to access Bio::AAindex2#[](aa1, aa2) method.
              Added a lazy-parsing by using @data.  
* test_aaindex.rb: Changed test codes for Bio::AAindex2#[] and BioAAindex2#matrix. 


Index: test_aaindex.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_aaindex.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_aaindex.rb	22 Feb 2006 05:07:36 -0000	1.2
--- test_aaindex.rb	22 Feb 2006 07:35:19 -0000	1.3
***************
*** 156,164 ****
      def test_matrix
        assert_equal(Matrix, @obj.matrix.class)
- #      assert_equal('', @obj.matrix)
      end
  
      def test_matrix_2_2
!       assert_equal(2.0, @obj.matrix[2,2])
      end
  
--- 156,183 ----
      def test_matrix
        assert_equal(Matrix, @obj.matrix.class)
      end
  
      def test_matrix_2_2
!       assert_equal(2.0, @obj.matrix[2, 2])
!     end
! 
!     def test_matrix_1_2
!       assert_equal(nil, @obj.matrix[1, 2])
!     end
! 
!     def test_access_A_R
!       assert_equal(nil, @obj['A', 'R'])
!     end
! 
!     def test_access_R_A
!       assert_equal(-2.0, @obj['R', 'A'])
!     end
! 
!     def test_matrix_A_R
!       assert_equal(nil, @obj.matrix('A', 'R'))
!     end
! 
!     def test_matrix_R_A
!       assert_equal(-2.0, @obj.matrix('R', 'A'))
      end
  




More information about the bioruby-cvs mailing list