From bcda975a65224a8242e370e1e23a735ddb475914 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 18 Sep 2013 11:16:16 +0000 Subject: [PATCH] fixed broken tests not workin with Ruby2 git-svn-id: http://biopieces.googlecode.com/svn/trunk@2201 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/test/maasha/align/test_matches.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code_ruby/test/maasha/align/test_matches.rb b/code_ruby/test/maasha/align/test_matches.rb index 8603055..9fd1ff4 100755 --- a/code_ruby/test/maasha/align/test_matches.rb +++ b/code_ruby/test/maasha/align/test_matches.rb @@ -35,21 +35,21 @@ class MatchesTest < Test::Unit::TestCase end test "Matches.find with one match returns correctly" do - assert_equal("[q: 2 3 s: 0 1 l: 2 s: 0.0]", Matches.find("01cg", "cg23", 0, 0, 3, 3, 2).to_s) - assert_equal("[q: 0 1 s: 2 3 l: 2 s: 0.0]", Matches.find("cg23", "01cg", 0, 0, 3, 3, 2).to_s) + assert_equal(["q: 2 3 s: 0 1 l: 2 s: 0.0"], Matches.find("01cg", "cg23", 0, 0, 3, 3, 2).map(&:to_s)) + assert_equal(["q: 0 1 s: 2 3 l: 2 s: 0.0"], Matches.find("cg23", "01cg", 0, 0, 3, 3, 2).map(&:to_s)) end test "Matches.find with two matches returns correctly" do - assert_equal("[q: 0 1 s: 0 1 l: 2 s: 0.0, q: 3 4 s: 3 4 l: 2 s: 0.0]", Matches.find("atXcg", "atYcg", 0, 0, 4, 4, 2).to_s) - assert_equal("[q: 0 1 s: 0 1 l: 2 s: 0.0, q: 3 4 s: 3 4 l: 2 s: 0.0]", Matches.find("atYcg", "atXcg", 0, 0, 4, 4, 2).to_s) + assert_equal(["q: 0 1 s: 0 1 l: 2 s: 0.0", "q: 3 4 s: 3 4 l: 2 s: 0.0"], Matches.find("atXcg", "atYcg", 0, 0, 4, 4, 2).map(&:to_s)) + assert_equal(["q: 0 1 s: 0 1 l: 2 s: 0.0", "q: 3 4 s: 3 4 l: 2 s: 0.0"], Matches.find("atYcg", "atXcg", 0, 0, 4, 4, 2).map(&:to_s)) end test "Matches.find dont expand match outside space" do - assert_equal("[q: 1 2 s: 1 2 l: 2 s: 0.0]", Matches.find("atcg", "atcg", 1, 1, 2, 2, 2).to_s) + assert_equal(["q: 1 2 s: 1 2 l: 2 s: 0.0"], Matches.find("atcg", "atcg", 1, 1, 2, 2, 2).map(&:to_s)) end test "Matches.find right expands correctly" do - assert_equal("[q: 0 3 s: 0 3 l: 4 s: 0.0]", Matches.find("atcg", "atcg", 0, 0, 3, 3, 3).to_s) + assert_equal(["q: 0 3 s: 0 3 l: 4 s: 0.0"], Matches.find("atcg", "atcg", 0, 0, 3, 3, 3).map(&:to_s)) end # test "Matches.find left expands correctly" do -- 2.39.2