Re: invalid tests about range of integer values

> On Monday 2010-10-04 17:26 -0700, "GĂ©rard Talbot" wrote:
>>
>> > The following tests (in 20100917; I only spot-checked newer releases
>> > to check that some tests were still problematic) are invalid because
>> > they assume that CSS defines an allowed range of integer values,
>> > which it does not:
>> > counter-increment-013
>>
>> [snipped]
>>
>> {
>> (...)
>> > <meta name="assert" content="The property z-index set to a minimum
>> value minus 1 is correctly truncated to the minimum value.">
>>
>> This assertion was discussed at the CSS WG F2F in Beijing. It was
>> decided that tests need to test some boundaries that were reasonable.
>
> What was decided is, I believe, that it was reasonable to test that
> a reasonable range of values are supported.  It is not, however,
> reasonable to test that values outside that range are unsupported or
> truncated, based on the current spec.

David,

Isn't it what is supposed to happen with values outside a range?

Quote from the spec:

"
many properties that allow an integer or real number as a value actually
restrict the value to some range (...)
Some properties allow negative length values, but this may complicate
the formatting model and there may be implementation-specific limits. If
a negative length value cannot be supported, it should be converted to
the nearest value that can be supported.
(...)
em { color: rgb(300,0,0) }       /* clipped to rgb(255,0,0) */
em { color: rgb(255,-10,0) }     /* clipped to rgb(255,0,0) */
em { color: rgb(110%, 0%, 0%) }  /* clipped to rgb(100%,0%,0%) */
"
http://www.w3.org/TR/CSS21/syndata.html#values

Restrict, convert, clip: these verbs seem to support truncation of
values exceeding the range (floor or ceiling values).

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC2; October 1st 2010):
http://test.csswg.org/suites/css2.1/20101001/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/

Received on Tuesday, 5 October 2010 04:47:31 UTC