Number fixes.

(1) Change how LDouble computes hashCode to match standard Lua.
(2) Change how toJavaString deals with NaN, infinity, and -0.
(3) Move 0 * -2 case to end of mathlib test case so that problematic tests
    are towards the end.
This commit is contained in:
Ian Farmer
2008-06-02 04:18:42 +00:00
parent 807541ace2
commit ef2c087c1b
2 changed files with 15 additions and 6 deletions

View File

@@ -17,7 +17,6 @@ function binops( a, b )
return '--'
end
print( pcall( binops, 2, 0 ) )
print( pcall( binops, -2, 0 ) )
print( pcall( binops, 2.5, 0 ) )
print( pcall( binops, -2.5, 0 ) )
print( pcall( binops, 2, 1 ) )
@@ -41,9 +40,10 @@ print( pcall( binops, 2.25, 0 ) )
print( pcall( binops, 2.25, 2 ) )
print( pcall( binops, 2.25, .5 ) )
print( pcall( binops, 2.25, 2.5 ) )
print( pcall( binops, -2, 0 ) )
-- random tests
print("Random tests")
print( math.random(5,10) )
print( math.random(5,10) )
print( math.random(5,10) )