[BioRuby-cvs] bioruby/test/unit/bio/data test_aa.rb, 1.2,
1.3 test_codontable.rb, 1.2, 1.3 test_na.rb, 1.2, 1.3
Mitsuteru C. Nakao
nakao at pub.open-bio.org
Wed Nov 23 00:10:36 EST 2005
Update of /home/repository/bioruby/bioruby/test/unit/bio/data
In directory pub.open-bio.org:/tmp/cvs-serv15316/test/unit/bio/data
Modified Files:
test_aa.rb test_codontable.rb test_na.rb
Log Message:
* Fixed the order of arguments of assert_equal.
Index: test_codontable.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_codontable.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_codontable.rb 24 Sep 2005 03:12:56 -0000 1.2
--- test_codontable.rb 23 Nov 2005 05:10:34 -0000 1.3
***************
*** 49,65 ****
def test_definition
! assert_equal(@ct.definition, "Standard (Eukaryote)")
end
def test_start
! assert_equal(@ct.start, ['ttg', 'ctg', 'atg', 'gtg'])
end
def test_stop
! assert_equal(@ct.stop, ['taa', 'tag', 'tga'])
end
def test_accessor #[]
! assert_equal(@ct['atg'], 'M')
end
--- 49,65 ----
def test_definition
! assert_equal("Standard (Eukaryote)", @ct.definition)
end
def test_start
! assert_equal(['ttg', 'ctg', 'atg', 'gtg'], @ct.start)
end
def test_stop
! assert_equal(['taa', 'tag', 'tga'], @ct.stop)
end
def test_accessor #[]
! assert_equal('M', @ct['atg'])
end
***************
*** 67,73 ****
alternative = 'Y'
@ct['atg'] = alternative
! assert_equal(@ct['atg'], alternative)
@ct['atg'] = 'M'
! assert_equal(@ct['atg'], 'M')
end
--- 67,73 ----
alternative = 'Y'
@ct['atg'] = alternative
! assert_equal(alternative, @ct['atg'])
@ct['atg'] = 'M'
! assert_equal('M', @ct['atg'])
end
***************
*** 77,91 ****
def test_revtrans
! assert_equal(@ct.revtrans('M'), ['atg'])
end
def test_start_codon?
! assert_equal(@ct.start_codon?('atg'), true)
! assert_equal(@ct.start_codon?('taa'), false)
end
def test_stop_codon?
! assert_equal(@ct.stop_codon?('atg'), false)
! assert_equal(@ct.stop_codon?('taa'), true)
end
--- 77,91 ----
def test_revtrans
! assert_equal(['atg'], @ct.revtrans('M'))
end
def test_start_codon?
! assert_equal(true, @ct.start_codon?('atg'))
! assert_equal(false, @ct.start_codon?('taa'))
end
def test_stop_codon?
! assert_equal(false, @ct.stop_codon?('atg'))
! assert_equal(true, @ct.stop_codon?('taa'))
end
***************
*** 97,111 ****
def test_Starts
assert(Bio::CodonTable::Starts)
! assert_equal(Bio::CodonTable::Starts[1], ['ttg', 'ctg', 'atg', 'gtg'])
end
def test_stops
assert(Bio::CodonTable::Stops)
! assert_equal(Bio::CodonTable::Stops[1], ['taa', 'tag', 'tga'])
end
def test_Tables
assert(Bio::CodonTable::Tables)
! assert_equal(Bio::CodonTable::Tables[1], @ct.table)
end
--- 97,111 ----
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
Index: test_na.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_na.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_na.rb 24 Sep 2005 03:12:56 -0000 1.2
--- test_na.rb 23 Nov 2005 05:10:34 -0000 1.3
***************
*** 37,83 ****
def test_to_re
re = /[tc][ag][at][gc][tg][ac][tgc][atg][agc][atgc]atgc/
! assert_equal(@obj.to_re('yrwskmbdvnatgc'), re)
! assert_equal(Bio::NucleicAcid.to_re('yrwskmbdvnatgc'), re)
end
def test_Names
! assert_equal(Bio::NucleicAcid::Names['a'], 'a')
end
def test_Names_1_to_name
! assert_equal(Bio::NucleicAcid::Names['A'], 'adenine')
end
def test_Weight
mw = 135.15
! assert_equal(Bio::NucleicAcid::Weight['a'], mw)
! assert_equal(Bio::NucleicAcid::Weight[:adenine], mw)
end
def test_weight
mw = 135.15
! assert_equal(@obj.weight('a'), mw)
! assert_equal(Bio::NucleicAcid.weight('a'), mw)
end
def test_weight_rna
mw = 135.15
! assert_equal(@obj.weight('A', true), mw)
! assert_equal(Bio::NucleicAcid.weight('A', true), mw)
end
def test_accessor
! assert_equal(@obj['A'], 'adenine')
end
def test_names
! assert_equal(@obj.names, Bio::NucleicAcid::Names)
end
def test_na
! assert_equal(@obj.na, Bio::NucleicAcid::Names)
end
def test_name
! assert_equal(@obj.name('A'), 'adenine')
end
end
--- 37,83 ----
def test_to_re
re = /[tc][ag][at][gc][tg][ac][tgc][atg][agc][atgc]atgc/
! assert_equal(re, @obj.to_re('yrwskmbdvnatgc'))
! assert_equal(re, Bio::NucleicAcid.to_re('yrwskmbdvnatgc'))
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
mw = 135.15
! assert_equal(mw, @obj.weight('a'))
! assert_equal(mw, Bio::NucleicAcid.weight('a'))
end
def test_weight_rna
mw = 135.15
! assert_equal(mw, @obj.weight('A', true))
! assert_equal(mw, Bio::NucleicAcid.weight('A', true))
end
def test_accessor
! assert_equal('adenine', @obj['A'])
end
def test_names
! assert_equal(Bio::NucleicAcid::Names, @obj.names)
end
def test_na
! assert_equal(Bio::NucleicAcid::Names, @obj.na)
end
def test_name
! assert_equal('adenine', @obj.name('A'))
end
end
Index: test_aa.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_aa.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_aa.rb 24 Sep 2005 03:12:56 -0000 1.2
--- test_aa.rb 23 Nov 2005 05:10:34 -0000 1.3
***************
*** 36,100 ****
def test_bio_aminoacid
! assert_equal(Bio::AminoAcid['A'], 'Ala')
end
def test_13
! assert_equal(@obj['A'], "Ala")
end
def test_1n
! assert_equal(@obj.name('A'), 'alanine')
end
def test_to_1_name
! assert_equal(@obj.to_1('alanine'), 'A')
end
def test_to_1_3
! assert_equal(@obj.to_1('Ala'), 'A')
end
def test_to_1_1
! assert_equal(@obj.to_1('A'), 'A')
end
def test_to_3_name
! assert_equal(@obj.to_3('alanine'), 'Ala')
end
def test_to_3_3
! assert_equal(@obj.to_3('Ala'), 'Ala')
end
def test_to_3_1
! assert_equal(@obj.to_3('A'), 'Ala')
end
def test_one2three
! assert_equal(@obj.one2three('A'), 'Ala')
end
def test_three2one
! assert_equal(@obj.three2one('Ala'), 'A')
end
def test_one2name
! assert_equal(@obj.one2name('A'), 'alanine')
end
def test_name2one
! assert_equal(@obj.name2one('alanine'), 'A')
end
def test_three2name
! assert_equal(@obj.three2name('Ala'), 'alanine')
end
def test_name2three
! assert_equal(@obj.name2three('alanine'), 'Ala')
end
def test_to_re
! assert_equal(@obj.to_re('BZACDEFGHIKLMNPQRSTVWYU'), /[DN][EQ]ACDEFGHIKLMNPQRSTVWYU/)
end
end
--- 36,100 ----
def test_bio_aminoacid
! assert_equal('Ala', Bio::AminoAcid['A'])
end
def test_13
! assert_equal("Ala", @obj['A'])
end
def test_1n
! assert_equal('alanine', @obj.name('A'))
end
def test_to_1_name
! assert_equal('A', @obj.to_1('alanine'))
end
def test_to_1_3
! assert_equal('A', @obj.to_1('Ala'))
end
def test_to_1_1
! assert_equal('A', @obj.to_1('A'))
end
def test_to_3_name
! assert_equal('Ala', @obj.to_3('alanine'))
end
def test_to_3_3
! assert_equal('Ala', @obj.to_3('Ala'))
end
def test_to_3_1
! assert_equal('Ala', @obj.to_3('A'))
end
def test_one2three
! assert_equal('Ala', @obj.one2three('A'))
end
def test_three2one
! assert_equal('A', @obj.three2one('Ala'))
end
def test_one2name
! assert_equal('alanine', @obj.one2name('A'))
end
def test_name2one
! assert_equal('A', @obj.name2one('alanine'))
end
def test_three2name
! assert_equal('alanine', @obj.three2name('Ala'))
end
def test_name2three
! assert_equal('Ala', @obj.name2three('alanine'))
end
def test_to_re
! assert_equal(/[DN][EQ]ACDEFGHIKLMNPQRSTVWYU/, @obj.to_re('BZACDEFGHIKLMNPQRSTVWYU'))
end
end
More information about the bioruby-cvs
mailing list