Commit 148db6a6 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

oleaut32/tests: Add tests for GetSizeMax after dirty flag cleared.

parent 4edfe426
......@@ -1260,6 +1260,12 @@ static void test_load_save_bmp(void)
hr = IPersistStream_Save(src_stream, dst_stream, TRUE);
ok(hr == S_OK, "Save error %#lx\n", hr);
maxsize.QuadPart = 0;
hr = IPersistStream_GetSizeMax(src_stream, &maxsize);
todo_wine
ok(hr == S_OK, "GetSizeMax error %#lx\n", hr);
ok(maxsize.QuadPart == 74, "expected 74, got %s\n", wine_dbgstr_longlong(maxsize.QuadPart));
IPersistStream_Release(src_stream);
IStream_Release(dst_stream);
......@@ -1343,6 +1349,13 @@ static void test_load_save_icon(void)
hr = IPersistStream_Save(src_stream, dst_stream, TRUE);
ok(hr == S_OK, "Saveerror %#lx\n", hr);
maxsize.QuadPart = 0;
hr = IPersistStream_GetSizeMax(src_stream, &maxsize);
todo_wine
ok(hr == S_OK, "GetSizeMax error %#lx\n", hr);
todo_wine
ok(maxsize.QuadPart == 774, "expected 774, got %s\n", wine_dbgstr_longlong(maxsize.QuadPart));
IPersistStream_Release(src_stream);
IStream_Release(dst_stream);
......@@ -1420,6 +1433,11 @@ static void test_load_save_empty_picture(void)
hr = IPersistStream_Save(src_stream, dst_stream, TRUE);
ok(hr == S_OK, "Save error %#lx\n", hr);
maxsize.QuadPart = 0;
hr = IPersistStream_GetSizeMax(src_stream, &maxsize);
ok(hr == S_OK, "GetSizeMax error %#lx\n", hr);
ok(maxsize.QuadPart == 8, "expected 8, got %s\n", wine_dbgstr_longlong(maxsize.QuadPart));
mem = GlobalLock(hmem);
ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]);
ok(mem[1] == 0, "expected stream size 0, got %lu\n", mem[1]);
......
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