summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js')
-rw-r--r--js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js b/js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js
new file mode 100644
index 0000000000..67a4532d7d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/less-than/bigint-and-incomparable-string.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2018 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: Relational comparison of BigInt and string values
+esid: sec-abstract-relational-comparison
+features: [BigInt]
+---*/
+assert.sameValue('0n' < 1n, false, 'The result of ("0n" < 1n) is false');
+assert.sameValue('0.' < 1n, false, 'The result of ("0." < 1n) is false');
+assert.sameValue('.0' < 1n, false, 'The result of (".0" < 1n) is false');
+assert.sameValue('0/1' < 1n, false, 'The result of ("0/1" < 1n) is false');
+assert.sameValue('z0' < 1n, false, 'The result of ("z0" < 1n) is false');
+assert.sameValue('0z' < 1n, false, 'The result of ("0z" < 1n) is false');
+assert.sameValue('++0' < 1n, false, 'The result of ("++0" < 1n) is false');
+assert.sameValue('--0' < 1n, false, 'The result of ("--0" < 1n) is false');
+assert.sameValue('0e0' < 1n, false, 'The result of ("0e0" < 1n) is false');
+assert.sameValue('Infinity' < 1n, false, 'The result of ("Infinity" < 1n) is false');
+assert.sameValue(0n < '1n', false, 'The result of (0n < "1n") is false');
+assert.sameValue(0n < '1.', false, 'The result of (0n < "1.") is false');
+assert.sameValue(0n < '.1', false, 'The result of (0n < ".1") is false');
+assert.sameValue(0n < '1/1', false, 'The result of (0n < "1/1") is false');
+assert.sameValue(0n < 'z1', false, 'The result of (0n < "z1") is false');
+assert.sameValue(0n < '1z', false, 'The result of (0n < "1z") is false');
+assert.sameValue(0n < '++1', false, 'The result of (0n < "++1") is false');
+assert.sameValue(0n < '--1', false, 'The result of (0n < "--1") is false');
+assert.sameValue(0n < '1e0', false, 'The result of (0n < "1e0") is false');
+assert.sameValue(0n < 'Infinity', false, 'The result of (0n < "Infinity") is false');
+
+reportCompare(0, 0);