mirror of
https://github.com/tc39/test262.git
synced 2025-05-05 07:20:27 +02:00
Added tests for relational comparison among BigInt and Symbol
This commit is contained in:
parent
83d815328f
commit
340dfba5dc
17
test/language/expressions/greater-than/bigint-and-symbol.js
Normal file
17
test/language/expressions/greater-than/bigint-and-symbol.js
Normal 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.");
|
||||
|
19
test/language/expressions/less-than/bigint-and-symbol.js
Normal file
19
test/language/expressions/less-than/bigint-and-symbol.js
Normal 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.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user