Added tests for relational comparison among BigInt and Symbol

This commit is contained in:
Caio Lima 2018-05-08 09:28:53 -03:00
parent 83d815328f
commit 340dfba5dc
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(rhs) throws.");
assert.throws(TypeError, function() {
Symbol("2") > 3n;
}, "ToNumeric(rhs) 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(rhs) throws.");
assert.throws(TypeError, function() {
Symbol("2") < 3n;
}, "ToNumeric(rhs) throws.");