mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* test/ruby/test_float.rb: added test_strtod to test Float("0").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									9c61c44fba
								
							
						
					
					
						commit
						0603e040b2
					
				
					 2 changed files with 16 additions and 0 deletions
				
			
		|  | @ -51,4 +51,16 @@ class TestFloat < Test::Unit::TestCase | |||
|     b = 100000000000000000000000.0 | ||||
|     assert_equal(a == b, b == a) | ||||
|   end | ||||
| 
 | ||||
|   def test_strtod | ||||
|     a = Float("0") | ||||
|     assert(a.abs < Float::EPSILON) | ||||
|     a = Float("0.0") | ||||
|     assert(a.abs < Float::EPSILON) | ||||
|     a = Float("+0.0") | ||||
|     assert(a.abs < Float::EPSILON) | ||||
|     a = Float("-0.0") | ||||
|     assert(a.abs < Float::EPSILON) | ||||
|     # add expected behaviour here. | ||||
|   end | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nahi
						nahi