[前][次][番号順一覧][スレッド一覧]

ruby-changes:31659

From: zzak <ko1@a...>
Date: Thu, 21 Nov 2013 10:32:02 +0900 (JST)
Subject: [ruby-changes:31659] zzak:r43738 (trunk): * test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble

zzak	2013-11-21 10:31:51 +0900 (Thu, 21 Nov 2013)

  New Revision: 43738

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43738

  Log:
    * test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble

  Modified files:
    trunk/ChangeLog
    trunk/test/digest/test_digest.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43737)
+++ ChangeLog	(revision 43738)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 21 10:30:47 2013  Zachary Scott  <e@z...>
+
+	* test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble
+
 Wed Nov 20 20:54:01 2013  Masaya Tarui  <tarui@r...>
 
 	* tool/instruction.rb : fix typo.
Index: test/digest/test_digest.rb
===================================================================
--- test/digest/test_digest.rb	(revision 43737)
+++ test/digest/test_digest.rb	(revision 43738)
@@ -7,7 +7,7 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/digest/test_digest.rb#L7
 require 'tempfile'
 
 require 'digest'
-%w[digest/md5 digest/rmd160 digest/sha1 digest/sha2].each do |lib|
+%w[digest/md5 digest/rmd160 digest/sha1 digest/sha2 digest/bubblebabble].each do |lib|
   begin
     require lib
   rescue LoadError
@@ -104,6 +104,11 @@ module TestDigest https://github.com/ruby/ruby/blob/trunk/test/digest/test_digest.rb#L104
     }
   end
 
+  def test_bubblebabble
+    expected = "xopoh-fedac-fenyh-nehon-mopel-nivor-lumiz-rypon-gyfot-cosyz-rimez-lolyv-pekyz-rosud-ricob-surac-toxox"
+    assert_equal Digest::SHA256.bubblebabble('message'), expected
+  end
+
   class TestMD5 < Test::Unit::TestCase
     include TestDigest
     ALGO = Digest::MD5

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]