Update RegExp.prototype accessors for ES11 (#4103)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
@@ -50,44 +50,11 @@ try {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.source;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.global;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.ignoreCase;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.multiline;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.sticky;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
RegExp.prototype.unicode;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
assert (RegExp.prototype.source === '(?:)');
|
||||
assert (RegExp.prototype.global === undefined);
|
||||
assert (RegExp.prototype.ignoreCase === undefined);
|
||||
assert (RegExp.prototype.multiline === undefined);
|
||||
assert (RegExp.prototype.sticky === undefined);
|
||||
assert (RegExp.prototype.unicode === undefined);
|
||||
assert (RegExp.prototype.dotAll === undefined);
|
||||
assert (RegExp.prototype.flags === '');
|
||||
|
||||
@@ -61,12 +61,7 @@ var r = /abc/yg;
|
||||
m = r.exec ("strabcstr");
|
||||
assert (m === null);
|
||||
|
||||
try {
|
||||
RegExp.prototype.flags;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
assert (RegExp.prototype.flags === "");
|
||||
|
||||
var flagsProp = Object.getOwnPropertyDescriptor (RegExp.prototype, "flags");
|
||||
assert(flagsProp.get.call({}) === '');
|
||||
|
||||
@@ -39,12 +39,7 @@ assert(new RegExp('/\n/').source.length === 6);
|
||||
assert(new RegExp(/\/\//).source === '\\/\\/');
|
||||
assert(new RegExp(/\?\//g).source === '\\?\\/');
|
||||
|
||||
try {
|
||||
RegExp.prototype.source;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
assert (RegExp.prototype.source === '(?:)')
|
||||
|
||||
var sourceProp = Object.getOwnPropertyDescriptor (RegExp.prototype, "source");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user