diff --git a/test/language/expressions/greater-than/bigint-and-symbol.js b/test/language/expressions/greater-than/bigint-and-symbol.js new file mode 100644 index 0000000000..2247f5588c --- /dev/null +++ b/test/language/expressions/greater-than/bigint-and-symbol.js @@ -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."); + diff --git a/test/language/expressions/less-than/bigint-and-symbol.js b/test/language/expressions/less-than/bigint-and-symbol.js new file mode 100644 index 0000000000..e73d70b99f --- /dev/null +++ b/test/language/expressions/less-than/bigint-and-symbol.js @@ -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."); +