Skip to content

Commit 82da74b

Browse files
Gabriel Schulhofcodebytere
Gabriel Schulhof
authored andcommittedJun 7, 2020
n-api: add uint32 test for -1
Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for -1. Re: #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>
1 parent 4294d92 commit 82da74b

File tree

1 file changed

+1
-0
lines changed
  • test/js-native-api/test_number

1 file changed

+1
-0
lines changed
 

‎test/js-native-api/test_number/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ testUint32(4294967295);
4848
testUint32(4294967296, 0);
4949
testUint32(4294967297, 1);
5050
testUint32(17 * 4294967296 + 1, 1);
51+
testUint32(-1, 0xffffffff);
5152

5253
// Validate documented behavior when value is retrieved as 32-bit integer with
5354
// `napi_get_value_int32`

0 commit comments

Comments
 (0)
Please sign in to comment.