Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bugs in BigInt tests #1467

Closed
jakobkummerow opened this issue Mar 2, 2018 · 2 comments
Closed

Minor bugs in BigInt tests #1467

jakobkummerow opened this issue Mar 2, 2018 · 2 comments
Assignees

Comments

@jakobkummerow
Copy link

CC @rwaldron @leobalter @gsathya

I've found two minor issues with BigInt tests:

built-ins/BigInt/prototype/Symbol.toStringTag.js:
"verifyProperty" is destructive unless {restore: true} is passed. This makes the subsequent assert fail.
Fix:

--- a/test/built-ins/BigInt/prototype/Symbol.toStringTag.js
+++ b/test/built-ins/BigInt/prototype/Symbol.toStringTag.js
@@ -19,7 +19,7 @@ verifyProperty(BigInt.prototype, Symbol.toStringTag, {
   writable: false,
   enumerable: false,
   configurable: true
-});
+}, {restore: true});
 
 assert.sameValue(Object.prototype.toString.call(3n), "[object BigInt]");
 assert.sameValue(Object.prototype.toString.call(Object(3n)), "[object BigInt]");

built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js:
The inputs must have length 7 in order for the newly constructed arrays to have length 7 as well.
Fix:

--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js
@@ -14,8 +14,8 @@ includes: [testBigIntTypedArray.js]
 features: [BigInt, TypedArray]
 ---*/
 
-var sample1 = new BigInt64Array();
-var sample2 = new BigUint64Array();
+var sample1 = new BigInt64Array(7);
+var sample2 = new BigUint64Array(7);
 
 testWithBigIntTypedArrayConstructors(function(TA) {
   var sample = TA === BigInt64Array ? sample2 : sample1;
@littledan
Copy link
Member

cc @cxielarko

@cxielarko
Copy link
Contributor

These changes LGTM! (the second test fails in spidermonkey too; the first passes but probably shouldn't)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants