Skip to content

Commit

Permalink
test_range.rb: add Range#new test
Browse files Browse the repository at this point in the history
* test/ruby/test_range.rb (test_first_last): Add test for
  `Range.new`.  [Fix GH-971]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 17, 2015
1 parent e2a87e8 commit 13b3abb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Fri Jul 17 15:36:52 2015 yui-knk <spiketeika@gmail.com>

* test/ruby/test_range.rb (test_first_last): Add test for
`Range.new`. [Fix GH-971]

Fri Jul 17 15:36:40 2015 yui-knk <spiketeika@gmail.com>

* test/ruby/test_range.rb (test_first_last): Add assertions to
Expand Down
6 changes: 6 additions & 0 deletions test/ruby/test_range.rb
Expand Up @@ -4,6 +4,12 @@
require 'bigdecimal'

class TestRange < Test::Unit::TestCase
def test_new
assert_equal((0..2), Range.new(0, 2))
assert_equal((0..2), Range.new(0, 2, false))
assert_equal((0...2), Range.new(0, 2, true))
end

def test_range_string
# XXX: Is this really the test of Range?
assert_equal([], ("a" ... "a").to_a)
Expand Down

0 comments on commit 13b3abb

Please sign in to comment.