Commit 6928615d authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ole32/tests: Add some tests to exercise the enumerator.

parent 1556d831
......@@ -593,6 +593,34 @@ static void test_enum_fmtetc(IDataObject *src)
hr = IEnumFORMATETC_Reset(enum_fmt);
ok(hr == S_OK, "got %08x\n", hr);
if(src) /* Exercise the enumerator a bit */
{
IEnumFORMATETC *clone;
FORMATETC third_fmt;
hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Reset(enum_fmt);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Skip(enum_fmt, 2);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Clone(enum_fmt, &clone);
ok(hr == S_OK, "got %08x\n", hr);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);
ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n");
hr = IEnumFORMATETC_Next(clone, 1, &fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);
ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n");
IEnumFORMATETC_Release(clone);
}
IEnumFORMATETC_Release(enum_fmt);
IDataObject_Release(data);
}
......
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