From 76320ad18dbe47ffad498b1ea8f58a83a77d8189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Fri, 10 Feb 2017 17:18:50 +0100 Subject: [PATCH] Update tests when Intl constructor is called as a function https://github.com/tc39/ecma402/issues/57 https://github.com/tc39/ecma402/pull/84 --- test/intl402/DateTimeFormat/12.1.1_1.js | 7 ++++++- test/intl402/NumberFormat/11.1.1_1.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/intl402/DateTimeFormat/12.1.1_1.js b/test/intl402/DateTimeFormat/12.1.1_1.js index 5a042454a21..7d1d00413dc 100644 --- a/test/intl402/DateTimeFormat/12.1.1_1.js +++ b/test/intl402/DateTimeFormat/12.1.1_1.js @@ -3,12 +3,17 @@ /*--- 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 includes: [testIntl.js] ---*/ testWithIntlConstructors(function (Constructor) { + if (Constructor === Intl.DateTimeFormat) + return true; + var obj, newObj; // variant 1: use constructor in a "new" expression diff --git a/test/intl402/NumberFormat/11.1.1_1.js b/test/intl402/NumberFormat/11.1.1_1.js index 6e36af019b8..035e74a10cf 100644 --- a/test/intl402/NumberFormat/11.1.1_1.js +++ b/test/intl402/NumberFormat/11.1.1_1.js @@ -3,12 +3,17 @@ /*--- 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 includes: [testIntl.js] ---*/ testWithIntlConstructors(function (Constructor) { + if (Constructor === Intl.NumberFormat) + return true; + var obj, newObj; // variant 1: use constructor in a "new" expression