mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/digest/digest.c (rb_digest_class_init): Define
Digest::Class.new(). [Feature #3954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a8d8b8a68
commit
74cacd0df4
3 changed files with 19 additions and 0 deletions
|
|
@ -17,6 +17,12 @@ module TestDigest
|
|||
Data1 = "abc"
|
||||
Data2 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
||||
|
||||
def test_s_new
|
||||
self.class::DATA.each do |str, hexdigest|
|
||||
assert_raise(ArgumentError) { self.class::ALGO.new("") }
|
||||
end
|
||||
end
|
||||
|
||||
def test_s_hexdigest
|
||||
self.class::DATA.each do |str, hexdigest|
|
||||
assert_equal(hexdigest, self.class::ALGO.hexdigest(str))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue