Skip to content

Commit

Permalink
Merge pull request #127 from littledan/norm-opt-tweaks
Browse files Browse the repository at this point in the history
Normative optional test tweaks
  • Loading branch information
caridy committed Feb 21, 2017
2 parents 53b46fc + 575fd2b commit c787537
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions spec/datetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ <h1>UnwrapDateTimeFormat( _dtf_ )</h1>
for various methods which implement ECMA-402 v1 semantics for supporting initializing
existing Intl objects.
</p>
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
<emu-normative-optional>
<emu-alg>
2. If Type(_dtf_) is Object and _dtf_ does not have an [[initializedDateTimeFormat]] internal slot and ? InstanceofOperator(dtf, %DateTimeFormat%) is true, then
1. If Type(_dtf_) is Object and _dtf_ does not have an [[initializedDateTimeFormat]] internal slot and ? InstanceofOperator(dtf, %DateTimeFormat%) is true, then
1. If _dtf_ does not have an [[InitializedDateTimeFormat]] internal slot and ? InstanceofOperator(_dtf_, %DateTimeFormat%) is equal *true*, then
1. Let _dtf_ be Get(_dtf_, Intl.[[FallbackSymbol]]).
</emu-alg>
</div></emu-normative-optional>
</emu-normative-optional>
<emu-alg>
2. If Type(_dtf_) is not Object or _dtf_ does not have an [[initializedDateTimeFormat]] internal slot, then
3. If Type(_dtf_) is not Object or _dtf_ does not have an [[initializedDateTimeFormat]] internal slot, then
1. Throw a *TypeError* exception.
1. Return _dtf_.
</emu-alg>
Expand All @@ -413,14 +413,14 @@ <h1>Intl.DateTimeFormat ( [ _locales_ [ , _options_ ] ] )</h1>
1. Let _dateTimeFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%DateTimeFormatPrototype%"`, &laquo; [[InitializedIntlObject]], [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]], [[Hour12]], [[HourNo0]], [[Pattern]], [[BoundFormat]] &raquo;).
1. Perform ? InitializeDateTimeFormat(_dateTimeFormat_, _locales_, _options_).
</emu-alg>
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
<emu-normative-optional>
<emu-alg>
4. Let _this_ be the *this* value.
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %DateTimeFormat%), then
1. Perform ? DefineOwnPropertyOrThrow(_this_, Intl.[[FallbackSymbol]], { [[Value]]: _dateTimeFormat_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _this_.
</emu-alg>
</div></emu-normative-optional>
</emu-normative-optional>
<emu-alg>
6. Return _dateTimeFormat_.
</emu-alg>
Expand Down
8 changes: 4 additions & 4 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
}

emu-normative-optional {
margin: 1em 0;
border-left: 5px solid #ff6600;
padding: .5em;
display: block;
background: #ffeedd;
}

span.normative-optional {
padding-left: 5px;
text-transform: uppercase;
emu-normative-optional:before {
display: block;
color: #884400;
content: "NORMATIVE OPTIONAL";
}

</style>
Expand Down
2 changes: 1 addition & 1 deletion spec/intl.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>The Intl Object</h1>
</p>

<p>
The Intl object has an internal slot, [[FallbackSymbol]], which is a new %Symbol% in the current realm.
The Intl object has an internal slot, [[FallbackSymbol]], which is a new %Symbol% in the current realm with the [[Description]] `"IntlLegacyConstructedSymbol"`
</p>

<emu-clause id="sec-constructor-properties-of-the-intl-object">
Expand Down
8 changes: 4 additions & 4 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ <h1>UnwrapNumberFormat( _nf_ )</h1>
for various methods which implement ECMA-402 v1 semantics for supporting initializing
existing Intl objects.
</p>
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
<emu-normative-optional>
<emu-alg>
1. If Type(_nf_) is Object and _nf_ does not have an [[InitializedNumberFormat]] internal slot and ? InstanceofOperator(_nf_, %NumberFormat%) is equal *true*, then
1. Let _nf_ be Get(_nf_, Intl.[[FallbackSymbol]]).
</emu-alg>
</div></emu-normative-optional>
</emu-normative-optional>
<emu-alg>
2. If Type(_nf_) is not Object or _nf_ does not have an [[InitializedNumberFormat]] internal slot, then
1. Throw a *TypeError* exception.
Expand Down Expand Up @@ -489,14 +489,14 @@ <h1>Intl.NumberFormat ( [ _locales_ [ , _options_ ] ] )</h1>
1. Let _numberFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%NumberFormatPrototype%"`, &laquo; [[InitializedIntlObject]], [[InitializedNumberFormat]], [[Locale]], [[NumberingSystem]], [[Style]], [[Currency]], [[CurrencyDisplay]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[UseGrouping]], [[PositivePattern]], [[NegativePattern]], [[BoundFormat]] &raquo;).
1. Perform ? InitializeNumberFormat(_numberFormat_, _locales_, _options_).
</emu-alg>
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
<emu-normative-optional>
<emu-alg>
4. Let _this_ be the *this* value.
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %NumberFormat%), then
1. Perform ? DefineOwnPropertyOrThrow(_this_, Intl.[[FallbackSymbol]], { [[Value]]: _numberFormat_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _this_.
</emu-alg>
</div></emu-normative-optional>
</emu-normative-optional>
<emu-alg>
6. Return _numberFormat_.
</emu-alg>
Expand Down

0 comments on commit c787537

Please sign in to comment.