Skip to content

Commit 4ae6130

Browse files
Gabriel Schulhofcodebytere
Gabriel Schulhof
authored andcommitted
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
1 parent b2fb01a commit 4ae6130

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)