Merge pull request #1546 from caiolima/big-int-relational-symbol

Added tests for relational comparison among BigInt and Symbol
This commit is contained in:
Rick Waldron 2018-05-09 15:42:10 -04:00 committed by GitHub
commit c38bf8ba23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,17 @@
// Copyright (C) 2018 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Relational comparison of BigInt and Symbol values
esid: sec-abstract-relational-comparison
features: [BigInt, Symbol]
---*/
assert.throws(TypeError, function() {
3n > Symbol("2");
}, "ToNumeric(Symbol) on RHS throws.");
assert.throws(TypeError, function() {
Symbol("2") > 3n;
}, "ToNumeric(Symbol) on LHS throws.");

View File

@ -0,0 +1,19 @@
// Copyright (C) 2018 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Relational comparison of BigInt and Symbol values
esid: sec-abstract-relational-comparison
features: [BigInt, Symbol]
---*/
function MyError() {}
assert.throws(TypeError, function() {
3n < Symbol("2");
}, "ToNumeric(Symbol) on RHS throws.");
assert.throws(TypeError, function() {
Symbol("2") < 3n;
}, "ToNumeric(Symbol) on LHS throws.");