Update tests when Intl constructor is called as a function

https://github.com/tc39/ecma402/issues/57
https://github.com/tc39/ecma402/pull/84
This commit is contained in:
André Bargull 2017-02-10 17:18:50 +01:00
parent fdccf26317
commit 76320ad18d
2 changed files with 12 additions and 2 deletions

View File

@ -3,12 +3,17 @@
/*--- /*---
es5id: 12.1.1_1 es5id: 12.1.1_1
description: Tests that the this-value is ignored in DateTimeFormat. description: >
Tests that the this-value is ignored in DateTimeFormat, if the this-value
isn't a DateTimeFormat instance.
author: Norbert Lindenberg author: Norbert Lindenberg
includes: [testIntl.js] includes: [testIntl.js]
---*/ ---*/
testWithIntlConstructors(function (Constructor) { testWithIntlConstructors(function (Constructor) {
if (Constructor === Intl.DateTimeFormat)
return true;
var obj, newObj; var obj, newObj;
// variant 1: use constructor in a "new" expression // variant 1: use constructor in a "new" expression

View File

@ -3,12 +3,17 @@
/*--- /*---
es5id: 11.1.1_1 es5id: 11.1.1_1
description: Tests that the this-value is ignored in NumberFormat. description: >
Tests that the this-value is ignored in NumberFormat, if the this-value
isn't a NumberFormat instance.
author: Norbert Lindenberg author: Norbert Lindenberg
includes: [testIntl.js] includes: [testIntl.js]
---*/ ---*/
testWithIntlConstructors(function (Constructor) { testWithIntlConstructors(function (Constructor) {
if (Constructor === Intl.NumberFormat)
return true;
var obj, newObj; var obj, newObj;
// variant 1: use constructor in a "new" expression // variant 1: use constructor in a "new" expression