mirror of https://github.com/tc39/test262.git
Improve coverage for Error.prototype.message
Extend coverage to include the property's writability, configurability, and value. Use the conventional `verifyProperty` harness function to consolidate tests.
This commit is contained in:
parent
6540b15597
commit
c138c2acbe
|
@ -1,11 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 15.11.4.3-1
|
||||
description: Error.prototype.message is not enumerable.
|
||||
---*/
|
||||
|
||||
for (var i in Error.prototype) {
|
||||
assert.notSameValue(i, "message", 'i');
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Error.prototype has message property
|
||||
es5id: 15.11.4.3_A1
|
||||
description: Checking Error.prototype.message
|
||||
---*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#1
|
||||
if (!Error.prototype.hasOwnProperty('message')) {
|
||||
throw new Test262Error('#1: Error.prototype.hasOwnProperty(\'message\') reurn true. Actual: ' + Error.prototype.hasOwnProperty('message'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The initial value of Error.prototype.message is ""
|
||||
es5id: 15.11.4.3_A2
|
||||
description: Checking value of Error.prototype.message
|
||||
---*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#1
|
||||
if (typeof Error.prototype.message !== "string") {
|
||||
throw new Test262Error('#1: typeof Error.prototype.message === "string". Actual: ' + Error.prototype.message);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) 2021 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-error.prototype.message
|
||||
description: Property descriptor of Error.prototype.message
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Error.prototype, 'message', {
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: ''
|
||||
});
|
Loading…
Reference in New Issue