Commit ca7e757f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/composite: Implement CommonPrefixWith() without iterators.

parent 1f261967
......@@ -3290,24 +3290,30 @@ todo_wine
hr = create_moniker_from_desc("CI1I2", &moniker1);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker1, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
moniker2 = (void *)0xdeadbeef;
hr = IMoniker_CommonPrefixWith(moniker, NULL, &moniker2);
todo_wine
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
ok(!moniker2, "Unexpected pointer.\n");
/* With itself */
hr = IMoniker_CommonPrefixWith(moniker, moniker, &moniker2);
todo_wine
ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2);
todo_wine
ok(moniker2 != moniker, "Unexpected object.\n");
TEST_DISPLAY_NAME(moniker2, L"!I1!I2");
ok(hr == S_OK && moniker2 != moniker, "Unexpected hr %#x.\n", hr);
IMoniker_Release(moniker2);
/* Equal composites */
hr = IMoniker_CommonPrefixWith(moniker, moniker1, &moniker2);
ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr);
todo_wine
ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr);
ok(moniker2 != moniker && moniker2 != moniker1, "Unexpected object.\n");
hr = IMoniker_IsEqual(moniker, moniker2);
todo_wine
......@@ -3325,7 +3331,6 @@ todo_wine
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3);
ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr);
hr = IMoniker_IsEqual(moniker2, moniker3);
todo_wine
ok(hr == S_OK && moniker3 != moniker2, "Unexpected object.\n");
IMoniker_Release(moniker3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment