[1/2] msxml3/tests: Reduce code duplication for the namespace change tests.

Nikolay Sivov bunglehead at gmail.com
Tue Jun 12 06:38:53 CDT 2012


On 6/12/2012 13:33, Ulrik Dickow wrote:
> Den 12-06-2012 13:11, Nikolay Sivov skrev:
>> On 6/12/2012 11:52, Ulrik Dickow wrote:
>>> +    /* create on element and try to alter namespace after that */
>>> +    doc = (doc_version == 0 ?
>>> +           create_document(&IID_IXMLDOMDocument) :
>>> +           create_document_version(60, &IID_IXMLDOMDocument));
>>> +    if (!doc) return;
>> Please use something like CLSID array with every available Document
>> CLSID, instead of only testing 2 of them. There's a lot of examples for
>> that in saxreader.c.
> Yes, that would be a good idea later on.  But note that I didn't invent
> this "only test 2 of them" thing.  This first patch was meant as a tiny
> structural improvement to the code, without changing _any_ functionality
> at all (except that the line number info becomes a bit less useful).
Sure, I'm not saying that it's your invention or that you're responsible 
for that, but since
you're willing to change corresponding implementation it's better to 
have it fully tested and
that means with all possible versions too.
>
>>> +    test_namespaces_change(0);
>>> +    test_namespaces_change(60);
>>>   
>>>       free_bstrs();
>>>   }
>> It's better to avoid nested test calls like that imho, you could just
>> add another call in main test list.
> Yes, I considered that, but again would make this patch change as little
> as possible, except for simplifying existing code.
>
> Ok, since I have to redo patch 2 anyway, I'll also make this improvement
> to patch 1.
Thanks.





More information about the wine-devel mailing list