Re: Valid to use subproperties as reference file for shorthand property test?

Le 2014-11-11 21:31, Zhang, Zhiqiang a écrit :
> Hi,
> 
> My colleague (CC'ed) is trying to create some reference files to
> automate CSS tests.
> 
> After reading a test at
> 
> https://github.com/w3c/csswg-test/blob/master/css21/fonts/font-044.xht
> 
> ... that "a system font sets all of the font subproperties at the same
> time; then each font subproperty can be altered individually",
> ... he creates a reference file at
> 
> https://github.com/chenxix/csswg-test/blob/473dafa9a5420cd7e0ee583789a7d109109d0ca6/css21/fonts/font-003-ref.html
> span {
>   font-variant: small-caps;
>   font-size: 1in;
>   font-family: serif;
>   line-height: 1em;
> }
> 
> ... for the test case at
> https://github.com/chenxix/csswg-test/blob/473dafa9a5420cd7e0ee583789a7d109109d0ca6/css21/fonts/font-003.xht
> span
> {
>   font: small-caps 1in serif;
>   line-height: 1em;
> }

This is the same as

span
{
  font: small-caps 1in/1em serif;
}


> 
> Is this a valid method to create reference file?
> 

Syntaxically, yes. If the test is testing the shorthand syntax and what 
it means in terms of each individual subproperties, then yes.

If the test is testing the statement:

"a system font sets all of the font subproperties at the same
time; then each font subproperty can be altered individually"

then, no, the test is not perfectly consequent, coherent with the test 
assert.



> Per
> http://testthewebforward.org/docs/reftests.html#2-the-reftest-reference-file,
> "reference file must not use the same features that are being tested,
> but uses a different method to produce the same rendering as a test
> file", seems this method is not acceptable.
> 

If the test is specifically testing shorthand syntax and what it means 
in terms of individual subproperties, then the test and its reference 
file is okay, correct. If the test is specifically testing the statement
"
a system font sets all of the font subproperties at the same time; then 
each font subproperty can be altered individually
"
then the test is not okay, is not correct, is not consequent.

> Feel free to review the reference files at
> https://github.com/w3c/csswg-test/pull/604
> 

I am still not confortable with GitHub right now... Sorry.

Gérard

> Thanks,
> Zhiqiang

-- 
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Received on Wednesday, 12 November 2014 05:24:59 UTC