Add the new test suite.
This test suite has been in use for a long time now, in place of the obsolete and unmanageable testparser.py and testfuncs.py. It verifies the complete optimizer output to stdout and stderr, to ensure that the output matches the expectations. See unit_tests/README.txt for more info.
This commit is contained in:
67
unit_tests/expr.suite/math-funcs.lsl
Normal file
67
unit_tests/expr.suite/math-funcs.lsl
Normal file
@@ -0,0 +1,67 @@
|
||||
[ llAbs(0)
|
||||
, llAbs(4)
|
||||
, llAbs(-4)
|
||||
, llAbs(2147483647)
|
||||
, llAbs(-2147483647)
|
||||
, llAbs(-2147483649)
|
||||
, llAbs(-2147483650)
|
||||
, llFabs(-0.0)
|
||||
, llFabs(1e40)
|
||||
, llFabs(-1e40)
|
||||
, llFabs(2147483648.)
|
||||
, llFabs(-2147483648.)
|
||||
, llFabs(1e40*0)
|
||||
, llFabs(-1e40*0)
|
||||
, llFabs(1.0)
|
||||
, llFabs(1.0000001)
|
||||
, llFabs(0.99999995)
|
||||
, llFloor(-0.0)
|
||||
, llFloor(1e40)
|
||||
, llFloor(2147483648.)
|
||||
, llFloor(-2147483648.)
|
||||
, llFloor(1e40*0)
|
||||
, llFloor(-1e40*0)
|
||||
, llFloor(1.0)
|
||||
, llFloor(1.0000001)
|
||||
, llFloor(0.99999995)
|
||||
, llCeil(-0.0)
|
||||
, llCeil(1e40)
|
||||
, llCeil(2147483648.)
|
||||
, llCeil(-2147483648.)
|
||||
, llCeil(1e40*0)
|
||||
, llCeil(-1e40*0)
|
||||
, llCeil(1.0)
|
||||
, llCeil(1.0000001)
|
||||
, llCeil(0.99999995)
|
||||
, llRound(-0.0)
|
||||
, llRound(1e40)
|
||||
, llRound(2147483648.)
|
||||
, llRound(-2147483648.)
|
||||
, llRound(1e40*0)
|
||||
, llRound(-1e40*0)
|
||||
, llRound(1.0)
|
||||
, llRound(1.0000001)
|
||||
, llRound(0.99999995)
|
||||
, llRound(0.49999997) // gives 1!
|
||||
, llRound(0.5)
|
||||
, llRound(0.50000005)
|
||||
, llRound(-0.49999997) // gives 0
|
||||
, llRound(-0.5) // gives 0
|
||||
, llRound(-0.50000005) // gives -1
|
||||
, llRound(-2.5)
|
||||
, llRound(-3.5)
|
||||
, llSqrt(-1.)
|
||||
, llSqrt(0.)
|
||||
, llSqrt(-0.)
|
||||
, llSqrt(1.)
|
||||
, llSqrt(2.)
|
||||
, llSqrt(1e40)
|
||||
, llSqrt(1e40*0)
|
||||
, llSqrt(-1e40*0)
|
||||
, llVecMag(<-0.,-0.,-0.>)
|
||||
, llVecMag(<48, 60, 64>)
|
||||
, llVecMag(<-48, -60, -64>)
|
||||
, llVecDist(<0,0,0>, <0,0,0>)
|
||||
, llVecDist(<0,0,0>, <48,-60,-64>)
|
||||
, llVecDist(<-30,30,30>, <18,-30,-34>)
|
||||
]
|
||||
Reference in New Issue
Block a user