mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
n-api: add uint32 test for -1
Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1. Re: https://github.com/nodejs/node/issues/33117 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
This commit is contained in:
@@ -48,6 +48,7 @@ testUint32(4294967295);
|
||||
testUint32(4294967296, 0);
|
||||
testUint32(4294967297, 1);
|
||||
testUint32(17 * 4294967296 + 1, 1);
|
||||
testUint32(-1, 0xffffffff);
|
||||
|
||||
// Validate documented behavior when value is retrieved as 32-bit integer with
|
||||
// `napi_get_value_int32`
|
||||
|
||||
Reference in New Issue
Block a user