From bf4de3f6f761bc73801eadffc63a0c18d00c2db7 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 6 Jun 2017 13:38:23 -0400 Subject: [PATCH] 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. --- test/functional/eval/msgpack_functions_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/eval/msgpack_functions_spec.lua b/test/functional/eval/msgpack_functions_spec.lua index 8ed01d4996..b241635dfe 100644 --- a/test/functional/eval/msgpack_functions_spec.lua +++ b/test/functional/eval/msgpack_functions_spec.lua @@ -352,7 +352,7 @@ describe('msgpack*() functions', function() eq(1, eval('type(parsed[0]) == type(0) ' .. '|| parsed[0]._TYPE is v:msgpack_types.integer')) 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')) else eq({_TYPE={}, _VAL={-1, 2, 0, 0}}, eval('parsed[0]'))