mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
functests/msgpack: Correct representation of literal INT64_MIN
In order to generate INT64_MIN from literal values, it's necessary to use "-0x7fffffffffffffff - 1". Using "-0x8000000000000000" causes the value to get clamped to INT64_MAX and then negated.
This commit is contained in:
parent
d69286c065
commit
bf4de3f6f7
@ -352,7 +352,7 @@ describe('msgpack*() functions', function()
|
|||||||
eq(1, eval('type(parsed[0]) == type(0) ' ..
|
eq(1, eval('type(parsed[0]) == type(0) ' ..
|
||||||
'|| parsed[0]._TYPE is v:msgpack_types.integer'))
|
'|| parsed[0]._TYPE is v:msgpack_types.integer'))
|
||||||
if eval('type(parsed[0]) == type(0)') == 1 then
|
if eval('type(parsed[0]) == type(0)') == 1 then
|
||||||
command('call assert_equal(-0x8000000000000000, parsed[0])')
|
command('call assert_equal(-0x7fffffffffffffff - 1, parsed[0])')
|
||||||
eq({}, eval('v:errors'))
|
eq({}, eval('v:errors'))
|
||||||
else
|
else
|
||||||
eq({_TYPE={}, _VAL={-1, 2, 0, 0}}, eval('parsed[0]'))
|
eq({_TYPE={}, _VAL={-1, 2, 0, 0}}, eval('parsed[0]'))
|
||||||
|
Loading…
Reference in New Issue
Block a user