From 9ffc09fb7af87d918d64c66bc8e7041d822f442c 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 | 5 ++++- test/intl402/NumberFormat/11.1.1_1.js | 5 ++++- 2 files changed, 8 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..961ab034d46 100644 --- a/test/intl402/DateTimeFormat/12.1.1_1.js +++ b/test/intl402/DateTimeFormat/12.1.1_1.js @@ -3,12 +3,15 @@ /*--- 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..8817af24ca2 100644 --- a/test/intl402/NumberFormat/11.1.1_1.js +++ b/test/intl402/NumberFormat/11.1.1_1.js @@ -3,12 +3,15 @@ /*--- 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