mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix blunder in operator priority
-a//-b did the wrong thing. Use -(a//-b) and add corresponding regression tests.
This commit is contained in:
parent
37483a72cb
commit
74115345f0
2 changed files with 10 additions and 1 deletions
|
@ -516,6 +516,15 @@ def do_tests():
|
|||
shouldexcept('div(1, NaN)', ELSLMathError)
|
||||
shouldexcept('div(F32(1e40), F32(1e40))', ELSLMathError)
|
||||
shouldexcept('zstr("blah")', ELSLInvalidType)
|
||||
test('div(1, 9)', 0)
|
||||
test('div(8, 9)', 0)
|
||||
test('div(9, 9)', 1)
|
||||
test('div(-1,9)', 0)
|
||||
test('div(-8,9)', 0)
|
||||
test('div(-9,9)', -1)
|
||||
test('div(1,-9)', 0)
|
||||
test('div(8,-9)', 0)
|
||||
test('div(9,-9)', -1)
|
||||
test(r'zstr(Key(u"xy\0zzy"))', Key(u'xy'))
|
||||
test('typecast(Infinity, unicode)', u'Infinity')
|
||||
test('typecast(NaN, unicode)', u'NaN')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue