Improve coverage for Error.prototype.toString

Extend coverage to include the property's enumerability, writability,
and configurability.
This commit is contained in:
Mike Pennisi 2021-07-19 22:53:31 -04:00 committed by Rick Waldron
parent cbd69bd26f
commit 4ec3eaaeb9
2 changed files with 13 additions and 16 deletions

View File

@ -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 toString property
es5id: 15.11.4.4_A1
description: Checking Error.prototype.toString
---*/
//////////////////////////////////////////////////////////////////////////////
// CHECK#1
if (!Error.prototype.hasOwnProperty('toString')) {
throw new Test262Error('#1: Error.prototype.hasOwnProperty(\'toString\') return true. Actual: ' + Error.prototype.hasOwnProperty('toString'));
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,13 @@
// 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.toString
description: Property descriptor of Error.prototype.toString
includes: [propertyHelper.js]
---*/
verifyProperty(Error.prototype, 'toString', {
enumerable: false,
writable: true,
configurable: true,
});