mirror of https://github.com/tc39/test262.git
Curation: remove v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js
A version of the same file, containing the same test with a more complete set of meta data, exists (this-value-ignored.js)
This commit is contained in:
parent
26fb624d4b
commit
8fc7cdaa05
|
@ -1,35 +0,0 @@
|
|||
// Copyright 2012 Mozilla Corporation. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.1.1_1
|
||||
description: Tests that the this-value is ignored in NumberFormat.
|
||||
author: Norbert Lindenberg
|
||||
includes: [testIntl.js]
|
||||
---*/
|
||||
|
||||
testWithIntlConstructors(function (Constructor) {
|
||||
var obj, newObj;
|
||||
|
||||
if (Constructor === Intl.NumberFormat) {
|
||||
obj = new Constructor();
|
||||
newObj = Intl.NumberFormat.call(obj);
|
||||
if (obj !== newObj) {
|
||||
$ERROR("Should have modified existing object.");
|
||||
}
|
||||
var key = Object.getOwnPropertySymbols(newObj)[0];
|
||||
if (!(newObj[key] instanceof Intl.NumberFormat)) {
|
||||
$ERROR("Should have installed a NumberFormat instance.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// variant 1: use constructor in a "new" expression
|
||||
obj = new Constructor();
|
||||
newObj = Intl.NumberFormat.call(obj);
|
||||
if (obj === newObj) {
|
||||
$ERROR("NumberFormat object created with \"new\" was not ignored as this-value.");
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
Loading…
Reference in New Issue