ruby-changes:50995
From: kou <ko1@a...>
Date: Fri, 20 Apr 2018 05:49:56 +0900 (JST)
Subject: [ruby-changes:50995] kou:r63202 (trunk): rexml: Use more debug friendly assertion style
kou 2018-04-20 05:49:53 +0900 (Fri, 20 Apr 2018) New Revision: 63202 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63202 Log: rexml: Use more debug friendly assertion style test/rexml/xpath/test_base.rb: Expand loop assertion and stop to checking just the first value. Modified files: trunk/test/rexml/xpath/test_base.rb Index: test/rexml/xpath/test_base.rb =================================================================== --- test/rexml/xpath/test_base.rb (revision 63201) +++ test/rexml/xpath/test_base.rb (revision 63202) @@ -860,11 +860,9 @@ module REXMLTests https://github.com/ruby/ruby/blob/trunk/test/rexml/xpath/test_base.rb#L860 </a> XML - for v,p in [[6, "sum(/a/b)"], - [9, "sum(//b | //d)"], - [3, "sum(/a/e/@*)"] ] - assert_equal( v, XPath::match( d, p ).first ) - end + assert_equal([6], XPath::match(d, "sum(/a/b)")) + assert_equal([9], XPath::match(d, "sum(//b | //d)")) + assert_equal([3], XPath::match(d, "sum(/a/e/@*)")) end def test_xpath_namespace -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/