diff --git a/test/built-ins/RegExp/duplicate-flags.js b/test/built-ins/RegExp/duplicate-flags.js index d689acc937..0339f83f26 100644 --- a/test/built-ins/RegExp/duplicate-flags.js +++ b/test/built-ins/RegExp/duplicate-flags.js @@ -10,9 +10,20 @@ description: Check that duplicate RegExp flags are disallowed features: [regexp-dotall] ---*/ +new RegExp("", "mig"); // single g will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "migg"), "duplicate g"); + +new RegExp("", "i"); // single i will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "ii"), "duplicate i"); + +new RegExp("", "m"); // single m will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "mm"), "duplicate m"); + +new RegExp("", "s"); // single s will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "ss"), "duplicate s"); + +new RegExp("", "u"); // single u will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "uu"), "duplicate u"); + +new RegExp("", "y"); // single y will not throw SyntaxError assert.throws(SyntaxError, () => new RegExp("", "yy"), "duplicate y"); diff --git a/test/built-ins/String/prototype/matchAll/regexp-matchAll-not-callable.js b/test/built-ins/String/prototype/matchAll/regexp-matchAll-not-callable.js index de3568c346..ef66ce9d8b 100644 --- a/test/built-ins/String/prototype/matchAll/regexp-matchAll-not-callable.js +++ b/test/built-ins/String/prototype/matchAll/regexp-matchAll-not-callable.js @@ -11,6 +11,8 @@ info: | features: [Symbol.matchAll, String.prototype.matchAll] ---*/ +assert.sameValue(typeof String.prototype.matchAll, "function"); + var regexp = /./; regexp[Symbol.matchAll] = true; diff --git a/test/built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js b/test/built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js index ee2b9484ce..d7c2b2f575 100644 --- a/test/built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js +++ b/test/built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js @@ -18,6 +18,8 @@ features: [Symbol.matchAll, String.prototype.matchAll] includes: [compareArray.js, compareIterator.js, regExpUtils.js] ---*/ +assert.sameValue(typeof String.prototype.matchAll, "function"); + delete RegExp.prototype[Symbol.matchAll]; var str = '/a/g*/b/g'; diff --git a/test/intl402/Segmenter/constructor/constructor/options-invalid.js b/test/intl402/Segmenter/constructor/constructor/options-invalid.js index 62c9b6dc29..4273fdee5d 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-invalid.js +++ b/test/intl402/Segmenter/constructor/constructor/options-invalid.js @@ -12,4 +12,6 @@ info: | features: [Intl.Segmenter] ---*/ +assert.sameValue(typeof Intl.Segmenter, "function"); + assert.throws(TypeError, function() { new Intl.Segmenter([], null) })