mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* test/digest/test_digest.rb: Add more tests for digest/bubblebabble
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									594eec5b7d
								
							
						
					
					
						commit
						671dbfdda8
					
				
					 2 changed files with 16 additions and 0 deletions
				
			
		|  | @ -1,3 +1,7 @@ | |||
| Thu Nov 21 16:50:16 2013  Zachary Scott  <e@zzak.io> | ||||
| 
 | ||||
| 	* test/digest/test_digest.rb: Add more tests for digest/bubblebabble | ||||
| 
 | ||||
| Thu Nov 21 16:32:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org> | ||||
| 
 | ||||
| 	* lib/delegate.rb (Delegator#method_missing): try private methods defined in | ||||
|  |  | |||
|  | @ -105,10 +105,22 @@ module TestDigest | |||
|   end | ||||
| 
 | ||||
|   def test_bubblebabble | ||||
|     expected = "xirek-hasol-fumik-lanax" | ||||
|     assert_equal Digest.bubblebabble('message'), expected | ||||
|   end | ||||
| 
 | ||||
|   def test_bubblebabble_class | ||||
|     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 | ||||
| 
 | ||||
|   def test_bubblebabble_instance | ||||
|     expected = "xumor-boceg-dakuz-sulic-gukoz-rutas-mekek-zovud-gunap-vabov-genin-rygyg-sanun-hykac-ruvah-dovah-huxex" | ||||
| 
 | ||||
|     hash = Digest::SHA256.new | ||||
|     assert_equal hash.bubblebabble, expected | ||||
|   end | ||||
| 
 | ||||
|   class TestMD5 < Test::Unit::TestCase | ||||
|     include TestDigest | ||||
|     ALGO = Digest::MD5 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zzak
						zzak