On 6/29/2013 20:26, John Chadwick wrote:
On Sat, Jun 29, 2013 at 4:48 AM, Nikolay Sivov bunglehead@gmail.com wrote:
On 6/27/2013 11:46, John Chadwick wrote:
- /* msxml's selectNodes returns a document ordered nodelist,
regardless of
* whether or not the xpath nodelist was document ordered... */
ole_check(IXMLDOMNode_selectNodes(rootNode,_bstr_("ancestor-or-self::node()"), &list));
- todo_expect_list_and_release(list, "D1 E2.D1");
Please use explicit check for return value, like ok(hr == S_OK, "...");,
Which return value am I missing? FWIW, I'm doing what the other tests are doing, as far as I can tell.
What I mean is that use of macros like ole_check() is discouraged, it's better to have explicit check for return value.
also you probably don't need another macro for list checking, isn't it enough to wrap expect_list_and_release() in todo_wine {} ?
Could it be that simple? I tried to do
todo_wine expect_list_and_release(list, "D1 E2.D1");
But it fails before the actual test occurs, because another test inside the macro succeeds, apparently. Are you saying if I wrap the expect_list_and_release macro call in a scope, it will work? I will try.
Yes, I see what you mean. In order to improve situation I'd suggest to move to using table of test queries and results. This way you have less code and no duplication, todo flag should just be stored in test data. We already have some tests done this way, it's much easier to maintain.
I figured creating a new macro would be a better solution than duplicating the code separately in two locations, but if it'd be better to just not use the macro, then that's simple enough to fix.