Skip to content

Commit

Permalink
updated metadata on several of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-allen committed Aug 22, 2023
1 parent 37376cf commit 9b6eb5e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Throws a RangeError for invalid `currency` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
6. Assert: type is "currency".
7. If ! IsWellFormedCurrencyCode(code) is false, throw a RangeError exception.
8. Return the ASCII-uppercase of code.
6.3.1 IsWellFormedCurrencyCode ( code )
IsWellFormedCurrencyCode ( code )
1. If the length of currency is not 3, return false.
2. Let normalized be the ASCII-uppercase of currency.
3. If normalized contains any code unit outside of 0x0041 through 0x005A (corresponding to Unicode characters LATIN CAPITAL LETTER A through LATIN CAPITAL LETTER Z), return false.
Expand Down Expand Up @@ -53,10 +53,6 @@ assert.throws(RangeError, function() {
displayNames.of('_aaa');
}, 'leading separator (underscore)');

assert.throws(RangeError, function() {
displayNames.of('aaa-');
}, 'trailing separator (dash)');

assert.throws(RangeError, function() {
displayNames.of('aaa_');
}, 'trailing separator (underscore)');
Expand Down
4 changes: 2 additions & 2 deletions test/intl402/DisplayNames/prototype/of/type-currency-valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Returns string value for valid `currency` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
6. Assert: type is "currency".
7. If ! IsWellFormedCurrencyCode(code) is false, throw a RangeError exception.
8. Return the ASCII-uppercase of code.
6.3.1 IsWellFormedCurrencyCode ( code )
IsWellFormedCurrencyCode ( code )
1. If the length of currency is not 3, return false.
2. Let normalized be the ASCII-uppercase of currency.
Expand Down
4 changes: 2 additions & 2 deletions test/intl402/DisplayNames/prototype/of/type-region-invalid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Throws a RangeError for invalid `region` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
2. If type is "region", then
Expand Down Expand Up @@ -64,7 +64,7 @@ assert.throws(RangeError, function() {
}, 'trailing separator (dash)');

assert.throws(RangeError, function() {
displayNames.of('111-');
displayNames.of('111_');
}, 'trailing separator (underscore)');

assert.throws(RangeError, function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Returns string value for valid `region` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
2. If type is "region", then
Expand Down
9 changes: 4 additions & 5 deletions test/intl402/DisplayNames/prototype/of/type-script-invalid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Throws a RangeError for invalid `script` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
3. If type is "script", then
a. If code cannot be matched by the unicode_script_subtag Unicode locale nonterminal, throw a RangeError exception.
Expand All @@ -22,7 +22,6 @@ assert.throws(RangeError, function() {
displayNames.of('aaa');
}, 'insufficient length');


assert.throws(RangeError, function() {
displayNames.of('aaaaa');
}, 'excessive length');
Expand All @@ -41,15 +40,15 @@ assert.throws(RangeError, function() {

assert.throws(RangeError, function() {
displayNames.of('aaaa-');
}, 'trailing separator, -');
}, 'trailing separator (dash)');

assert.throws(RangeError, function() {
displayNames.of('_aaaa');
}, 'leading separator, _');
}, 'leading separator (underscore)');

assert.throws(RangeError, function() {
displayNames.of('aaaa_');
}, 'trailing separator, _');
}, 'trailing separator (underscore)');

assert.throws(RangeError, function() {
displayNames.of('aa a');
Expand Down
3 changes: 2 additions & 1 deletion test/intl402/DisplayNames/prototype/of/type-script-valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
esid: sec-Intl.DisplayNames.prototype.of
description: Returns string value for valid `script` codes
info: |
12.3.3 Intl.DisplayNames.prototype.of ( code )
12.5.1 CanonicalCodeForDisplayNames ( type, code )
...
3. If type is "script", then
a. If code cannot be matched by the unicode_script_subtag Unicode locale nonterminal, throw a RangeError exception.
Expand Down

0 comments on commit 9b6eb5e

Please sign in to comment.