Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/tests/devices.c:
- hr = IDeviceInformation_get_Properties( info, &properties );
- todo_wine ok_(__FILE__, line)( hr == S_OK, "get_Properties failed, got hr %#lx\n", hr );
- if (FAILED(hr))
- {
WindowsDeleteString( id );
return;
- }
- for (i = 0; i < exp_props_len; i++)
- {
PropertyType type = 0xdeadbeef;
HSTRING_HEADER hdr;
winetest_push_context( "exp_props[%Iu]", i );
hr = WindowsCreateStringReference( exp_props[i].name, wcslen( exp_props[i].name ), &hdr, &str );
ok_(__FILE__, line)( hr == S_OK, "WindowsCreateStringReference failed, got hr %#lx\n", hr );
I think the test helper is getting overused. All these tests will end up with the same line as you use `ok_(__FILE__, line)` everywhere, and it'll be tricky to identify any failing test. Is it useful to run all these property tests on every object enumerated? You might want to use test context instead, and/or you might want to reduce the tests to explicit list of object / property combination.