mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/digest/test_digest.rb (test_eq): show failed class.
* test/ruby/test_iterator.rb (test_break, test_return_trace_func): test localjump destination. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c1b6f966be
commit
e45c4cd1ac
3 changed files with 31 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Oct 16 08:38:06 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/digest/test_digest.rb (test_eq): show failed class.
|
||||||
|
|
||||||
|
* test/ruby/test_iterator.rb (test_break, test_return_trace_func):
|
||||||
|
test localjump destination.
|
||||||
|
|
||||||
Wed Oct 15 20:22:31 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
Wed Oct 15 20:22:31 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||||
|
|
||||||
* lib/soap/netHttpClient.rb: use URI::HTTP#request_uri instead of
|
* lib/soap/netHttpClient.rb: use URI::HTTP#request_uri instead of
|
||||||
|
|
|
@ -76,16 +76,16 @@ class TestDigest < Test::Unit::TestCase
|
||||||
ALGOS.each do |algo|
|
ALGOS.each do |algo|
|
||||||
md1 = algo.new("ABC")
|
md1 = algo.new("ABC")
|
||||||
|
|
||||||
assert_equal(md1, md1.clone)
|
assert_equal(md1, md1.clone, algo)
|
||||||
|
|
||||||
md2 = algo.new
|
md2 = algo.new
|
||||||
md2 << "A"
|
md2 << "A"
|
||||||
|
|
||||||
assert(md1 != md2)
|
assert(md1 != md2, algo)
|
||||||
|
|
||||||
md2 << "BC"
|
md2 << "BC"
|
||||||
|
|
||||||
assert_equal(md1, md2)
|
assert_equal(md1, md2, algo)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -403,4 +403,25 @@ class TestIterator < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
assert(false, "must not reach here")
|
assert(false, "must not reach here")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_break_from_enum
|
||||||
|
result = ["a"].inject("ng") {|x,y| break "ok"}
|
||||||
|
assert_equal("ok", result)
|
||||||
|
end
|
||||||
|
|
||||||
|
def _test_return_trace_func(x)
|
||||||
|
set_trace_func(proc {})
|
||||||
|
[].fetch(2) {return x}
|
||||||
|
ensure
|
||||||
|
set_trace_func(nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_return_trace_func
|
||||||
|
ok = "returned gracefully"
|
||||||
|
result = "skipped"
|
||||||
|
result = _test_return_from_builtin(ok)
|
||||||
|
ensure
|
||||||
|
assert_equal(ok, result)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue