On 3/6/22 18:30, Bernhard Kölbl wrote:
- hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory2);
- ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x.\n", hr);
- ok(factory == factory2, "Factories pointed at factory %p factory2 %p.\n", factory, factory2);
- hr = RoGetActivationFactory(str2, &IID_IActivationFactory, (void **)&factory3);
- todo_wine ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x.\n", hr);
- if(hr == S_OK) /* Win10+ only */
I think that at least most recently added code uses a space after if.
- {
ok(factory != factory3, "Factories pointed at factory %p factory3 %p.\n", factory, factory3);hr = IActivationFactory_QueryInterface(factory3, &IID_IInspectable, (void**)&inspectable2);ok(hr == S_OK, "IActivationFactory_QueryInterface failed, hr %#x.\n", hr);hr = IActivationFactory_QueryInterface(factory3, &IID_IAgileObject, (void**)&agile_object2);ok(hr == S_OK, "IActivationFactory_QueryInterface failed, hr %#x.\n", hr);hr = IActivationFactory_QueryInterface(factory3, &IID_ISpeechRecognizerFactory, (void**)&recognizer_factory);ok(hr == S_OK, "IActivationFactory_QueryInterface failed, hr %#x.\n", hr);hr = IActivationFactory_QueryInterface(factory3, &IID_ISpeechRecognizerStatics, (void**)&recognizer_statics);ok(hr == S_OK, "IActivationFactory_QueryInterface failed, hr %#x.\n", hr);ref = ISpeechRecognizerStatics_Release(recognizer_statics);ok(ref == 5, "Got unexpected refcount: %u.\n", ref);ref = ISpeechRecognizerFactory_Release(recognizer_factory);ok(ref == 4, "Got unexpected refcount: %u.\n", ref);ref = IAgileObject_Release(agile_object2);ok(ref == 3, "Got unexpected refcount: %u.\n", ref);ref = IInspectable_Release(inspectable2);ok(ref == 2, "Got unexpected refcount: %u.\n", ref);hr = IActivationFactory_QueryInterface(factory3, &IID_ISpeechRecognizerStatics2, (void**)&recognizer_statics2);ok(hr == S_OK || broken(hr == E_NOINTERFACE), "IActivationFactory_QueryInterface failed, hr %#x.\n", hr);if(hr == S_OK) /* ISpeechRecognizerStatics2 not available in Win10 1507 */
Same here.
(Otherwise, I still think it'd make the test simpler and shorter if you used some check_interface / check_ref helpers, especially if you want to check refcount extensively)