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:
@@ -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) )
|
||||
|
||||
Reference in New Issue
Block a user