mirror of https://github.com/tc39/test262.git
Added tests for relational comparison among BigInt and Symbol
This commit is contained in:
parent
83d815328f
commit
340dfba5dc
|
@ -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.");
|
||||||
|
|
|
@ -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.");
|
||||||
|
|
Loading…
Reference in New Issue