-
Notifications
You must be signed in to change notification settings - Fork 479
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
Initial tests for BigInt.prototype.toLocaleString(). #2126
Conversation
Many of these tests are heavily based on the tests for Number.prototype.toLocaleString().
One bug in V8: it doesn't call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the following errors while I try to run test in v8
No license found in: intl402/BigInt/prototype/toLocaleString/builtin
No license found in: intl402/BigInt/prototype/toLocaleString/default-options-object-prototype
No license found in: intl402/BigInt/prototype/toLocaleString/length
No license found in: intl402/BigInt/prototype/toLocaleString/returns-same-results-as-NumberFormat
No license found in: intl402/BigInt/prototype/toLocaleString/taint-Intl-NumberFormat
No license found in: intl402/BigInt/prototype/toLocaleString/this-value-invalid
No license found in: intl402/BigInt/prototype/toLocaleString/throws-same-exceptions-as-NumberFormat
@@ -0,0 +1,28 @@ | |||
// Copyright 2012-2019 Mozilla Corporation; Igalia, S.L. All rights reserved. | |||
// This code is governed by the license found in the LICENSE file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the following error
"No license found in: intl402/BigInt/prototype/toLocaleString/builtin"
@@ -0,0 +1,14 @@ | |||
// Copyright 2013-2019 Mozilla Corporation; Igalia, S.L. All rights reserved. | |||
// This code is governed by the license found in the LICENSE file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a "No license found in: intl402/BigInt/prototype/toLocaleString/taint-Intl-NumberFormat"
I think you need to change the line "// This code is governed by the license found in the LICENSE file." to
something like "// This code is governed by the BSD license found in the LICENSE file."
for (const value of invalidValues) { | ||
assert.throws(TypeError, function() { | ||
BigInt.prototype.toLocaleString.call(value); | ||
}, "BigInt.prototype.toLocaleString did not reject this = " + value + "."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ' + value + ' won't work for the test case of Symbol()
Just FYI |
---*/ | ||
|
||
var invalidValues = [ | ||
// undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either remove the // or remove the whole line
It would be nice to additionally include tests that:
|
@Ms2ger I still get the missing license error that @FrankYFTang mentioned. These tests need to be updated:
|
@gsathya I can't reproduce that locally on master. Could you clarify where you see those errors? |
More tests: #2136 |
@Ms2ger, these tests break the license regexp in the test262 harness: |
Many of these tests are heavily based on the tests for
Number.prototype.toLocaleString().