From db238a1abef293067cd5921956f3a0fe7b0d8870 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Tue, 18 Sep 2018 00:56:37 +0530 Subject: [PATCH] intl: improve coverage for Intl.NumberFormat Add Intl.NumberFormat.prototype.formatToParts to the test this-value-not-numberformat.js to check if a TypeError is thrown if the "this" value for the function call isn't a valid NumberFormat object. --- .../NumberFormat/prototype/this-value-not-numberformat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/intl402/NumberFormat/prototype/this-value-not-numberformat.js b/test/intl402/NumberFormat/prototype/this-value-not-numberformat.js index e9ef77891f..321947cb29 100644 --- a/test/intl402/NumberFormat/prototype/this-value-not-numberformat.js +++ b/test/intl402/NumberFormat/prototype/this-value-not-numberformat.js @@ -12,6 +12,7 @@ author: Norbert Lindenberg var functions = { "format getter": Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get, + formatToParts: Intl.NumberFormat.prototype.formatToParts, resolvedOptions: Intl.NumberFormat.prototype.resolvedOptions }; var invalidTargets = [undefined, null, true, 0, "NumberFormat", [], {}];