diff --git a/test/intl402/NumberFormat/constructor-default-value.js b/test/intl402/NumberFormat/constructor-default-value.js index 00c6081a44e6d32e9aafc0d3cd7688b1f46eb074..0b6d69c9bc88ced31986a7aafe1b8f3ad21c86c7 100644 --- a/test/intl402/NumberFormat/constructor-default-value.js +++ b/test/intl402/NumberFormat/constructor-default-value.js @@ -8,7 +8,13 @@ description: > values for its arguments (locales and options). ---*/ -const actual = new Intl.NumberFormat(); -const expected = new Intl.NumberFormat([], { __proto__: null }); +const actual = new Intl.NumberFormat().resolvedOptions(); +const expected = new Intl.NumberFormat([], { __proto__: null }).resolvedOptions(); -assert.sameValue(actual.resolvedOptions(), expected.resolvedOptions()); +assert.sameValue(actual.locale, expected.locale); +assert.sameValue(actual.minimumIntegerDigits, expected.minimumIntegerDigits); +assert.sameValue(actual.minimumFractionDigits, expected.minimumFractionDigits); +assert.sameValue(actual.maximumFractionDigits, expected.maximumFractionDigits); +assert.sameValue(actual.numberingSystem, expected.numberingSystem); +assert.sameValue(actual.style, expected.style); +assert.sameValue(actual.useGrouping, expected.useGrouping); diff --git a/test/intl402/NumberFormat/constructor-locales-toobject.js b/test/intl402/NumberFormat/constructor-locales-toobject.js index 7799fcf66dcda5ac0eae33ce2eb3905a3a390a97..3d2625191bee83ed995d9e5604f1cf88ac41f951 100644 --- a/test/intl402/NumberFormat/constructor-locales-toobject.js +++ b/test/intl402/NumberFormat/constructor-locales-toobject.js @@ -22,10 +22,16 @@ const toObjectResults = [ // Test if ToObject is used to convert primitives to Objects. toObjectResults.forEach(pair => { const [value, result] = pair; - assert.sameValue( - new Intl.NumberFormat(value).resolvedOptions(), - new Intl.NumberFormat(result).resolvedOptions() - ); + const actual = new Intl.NumberFormat(value).resolvedOptions(); + const expected = new Intl.NumberFormat(result).resolvedOptions() + + assert.sameValue(actual.locale, expected.locale); + assert.sameValue(actual.minimumIntegerDigits, expected.minimumIntegerDigits); + assert.sameValue(actual.minimumFractionDigits, expected.minimumFractionDigits); + assert.sameValue(actual.maximumFractionDigits, expected.maximumFractionDigits); + assert.sameValue(actual.numberingSystem, expected.numberingSystem); + assert.sameValue(actual.style, expected.style); + assert.sameValue(actual.useGrouping, expected.useGrouping); }); // ToObject throws a TypeError for undefined and null, but it's not called diff --git a/test/intl402/NumberFormat/constructor-options-toobject.js b/test/intl402/NumberFormat/constructor-options-toobject.js index 7b1ed4e4be2f1be9617880533d1256284b9362ec..43f5d10edf1bbbb1a2dd4091586957aba05cb095 100644 --- a/test/intl402/NumberFormat/constructor-options-toobject.js +++ b/test/intl402/NumberFormat/constructor-options-toobject.js @@ -23,10 +23,16 @@ const toObjectResults = [ // Test if ToObject is used to convert primitives to Objects. toObjectResults.forEach(pair => { const [value, result] = pair; - assert.sameValue( - new Intl.NumberFormat(['en-US'], value).resolvedOptions(), - new Intl.NumberFormat(['en-US'], result).resolvedOptions() - ); + const actual = new Intl.NumberFormat(['en-US'], value).resolvedOptions(); + const expected = new Intl.NumberFormat(['en-US'], result).resolvedOptions(); + assert.sameValue(actual.locale, expected.locale); + assert.sameValue(actual.minimumIntegerDigits, expected.minimumIntegerDigits); + assert.sameValue(actual.minimumFractionDigits, expected.minimumFractionDigits); + assert.sameValue(actual.maximumFractionDigits, expected.maximumFractionDigits); + assert.sameValue(actual.numberingSystem, expected.numberingSystem); + assert.sameValue(actual.style, expected.style); + assert.sameValue(actual.useGrouping, expected.useGrouping); + }); // ToObject throws a TypeError for undefined and null, but it's not called