[gjs: 1/2] tests: Fix BigInt tests on 32-bit
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] tests: Fix BigInt tests on 32-bit
- Date: Tue, 22 Feb 2022 06:02:09 +0000 (UTC)
commit a81be96706588c69ebad5c310ddb050b73831ae6
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Feb 20 17:31:57 2022 -0800
tests: Fix BigInt tests on 32-bit
Since we test BigInt values for each type that has a key in the
BigIntLimits object, we need to not define keys for types that are not
64-bits.
installed-tests/js/testGIMarshalling.js | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index 02c03f0f9..1f13b311f 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -141,10 +141,6 @@ const BigIntLimits = {
max: 2n ** 63n - 1n,
umax: 2n ** 64n - 1n,
},
- long: {},
- ssize: {
- utype: 'size',
- },
};
Object.assign(Limits.short, Limits.int16);
@@ -152,13 +148,13 @@ Object.assign(Limits.int, Limits.int32);
// Platform dependent sizes; expand definitions as needed
if (GLib.SIZEOF_LONG === 8) {
Object.assign(Limits.long, Limits.int64);
- Object.assign(BigIntLimits.long, BigIntLimits.int64);
+ BigIntLimits.long = Object.assign({}, BigIntLimits.int64);
} else {
Object.assign(Limits.long, Limits.int32);
}
if (GLib.SIZEOF_SSIZE_T === 8) {
Object.assign(Limits.ssize, Limits.int64);
- Object.assign(BigIntLimits.ssize, BigIntLimits.int64);
+ BigIntLimits.ssize = Object.assign({utype: 'size'}, BigIntLimits.int64);
} else {
Object.assign(Limits.ssize, Limits.int32);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]