mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
Drop 3 tests testing an obsolete Ecma402 v1 spec (#807)
The following three tests check an obsolete provision in Ecma 402 v1 regarding Intl.{Collator,DateTimeFormat,NumberFormat} constructor called as a function. Collator/10.1.2.1_4.js DateTimeFormat/12.1.2.1_4.js NumberFormat/11.1.2.1_4.js
This commit is contained in:
parent
fcc9e07265
commit
6a0f1189eb
@ -1,22 +0,0 @@
|
||||
// Copyright 2012 Mozilla Corporation. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 10.1.2.1_4
|
||||
description: >
|
||||
Tests that non-object values passed as this to Collator are ignored
|
||||
and a normal collator object will be initialized and returned.
|
||||
author: Norbert Lindenberg
|
||||
---*/
|
||||
|
||||
var thisValues = [true, 42, "国際化"];
|
||||
|
||||
thisValues.forEach(function (value) {
|
||||
var collator = Intl.Collator.call(value);
|
||||
// check that the returned object functions as a collator
|
||||
var referenceCollator = new Intl.Collator();
|
||||
if (Intl.Collator.prototype.compare.call(collator, "a", "b") !== referenceCollator.compare("a", "b")) {
|
||||
$ERROR("Collator initialized from " + value + " doesn't behave like normal collator.");
|
||||
}
|
||||
return true;
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
// Copyright 2012 Mozilla Corporation. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 12.1.2.1_4
|
||||
description: >
|
||||
Tests that non-object values passed as this to DateTimeFormat are ignored
|
||||
and a normal date-time format object will be initialized and returned.
|
||||
author: Norbert Lindenberg
|
||||
---*/
|
||||
|
||||
var thisValues = [true, 42, "国際化"];
|
||||
|
||||
thisValues.forEach(function (value) {
|
||||
var format = Intl.DateTimeFormat.call(value);
|
||||
// check that the returned object functions as a date-time format
|
||||
var referenceFormat = new Intl.DateTimeFormat();
|
||||
if (Intl.DateTimeFormat.prototype.format.call(format, new Date(111111111)) !== referenceFormat.format(new Date(111111111))) {
|
||||
$ERROR("DateTimeFormat initialized from " + value + " doesn't behave like normal date-time format.");
|
||||
}
|
||||
return true;
|
||||
});
|
@ -1,22 +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.2.1_4
|
||||
description: >
|
||||
Tests that non-object values passed as this to NumberFormat are ignored
|
||||
and a normal number format object will be initialized and returned.
|
||||
author: Norbert Lindenberg
|
||||
---*/
|
||||
|
||||
var thisValues = [true, 42, "国際化"];
|
||||
|
||||
thisValues.forEach(function (value) {
|
||||
var format = Intl.NumberFormat.call(value);
|
||||
// check that the returned object functions as a number format
|
||||
var referenceFormat = new Intl.NumberFormat();
|
||||
if (Intl.NumberFormat.prototype.format.call(format, 12.3456) !== referenceFormat.format(12.3456)) {
|
||||
$ERROR("NumberFormat initialized from " + value + " doesn't behave like normal number format.");
|
||||
}
|
||||
return true;
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user