Project

General

Profile

Feature #8956 » no-comma-tests.patch

adamdunson (Addie Drake), 10/12/2013 12:16 AM

View differences:

test/ruby/test_array.rb
assert_include([4, 7], a.bsearch {|x| (2**100).coerce((1 - x / 4) * (2**100)).first })
end
def test_array_no_comma
feature8956 = [
:foo,
:bar,
[
:baz,
:qux
]
]
assert_equal(feature8956, [
:foo
:bar
[
:baz
:qux
]
])
assert_equal(feature8956, @cls[
:foo
:bar
[
:baz
:qux
]
])
assert_equal(feature8956, @cls.[](
:foo
:bar
[
:baz
:qux
]
))
end
end
test/ruby/test_call.rb
assert_equal([1, 2, 3, 4], aaa(1, 2, 3, 4))
assert_equal([1, 2, 3, 4], aaa(1, *[2, 3, 4]))
end
def test_call_no_comma
assert_equal([1, 2], aaa(1
2))
assert_equal([1, 2, 3, 4], aaa(1
2
3
4))
assert_equal([1, 2, 3, 4], aaa(1
*[2, 3, 4]))
end
end
test/ruby/test_hash.rb
end
end
def test_hash_no_comma
feature8956 = {
:foo => 'bar',
:bar => 'foo',
:baz => {
:qux => 'quux',
:corge => 'grault'
}
}
assert_equal(feature8956, {
:foo => 'bar'
:bar => 'foo'
:baz => {
:qux => 'quux'
:corge => 'grault'
}
})
assert_equal(feature8956, @cls[
:foo => 'bar'
:bar => 'foo'
:baz => {
:qux => 'quux'
:corge => 'grault'
}
])
assert_equal(feature8956, @cls.[](
:foo => 'bar'
:bar => 'foo'
:baz => {
:qux => 'quux'
:corge => 'grault'
}
))
end
class TestSubHash < TestHash
class SubHash < Hash
end
(6-6/7)