message testing for progress.c
Brandy Liu
kice_jojo at hotmail.com
Thu Mar 1 15:33:57 CST 2007
My name is Brandy Liu. I'm a currently a student of UCLA. I hereby certify that I wrote this code withoutcopying from anyone else's sources, and I've never seen any secretMicrosoft source code.Index:dlls/comctl32/tests/progress.c============================================================================--- dlls/comctl32//tests/progress.c 2007-03-01 11:54:35.000000000 -0800+++ dlls/comctl32/mytests/progress.c 2007-02-23 13:17:04.000000000 -0800@@ -135,15 +135,56 @@ * Tests if a progress bar repaints itself immediately when it receives * some specific messages. */-static void test_redraw(void)++static void test_setRange(void) { RECT client_rect;+ int result, result32;+ update_window(hProgressWnd);++ /* PBM_SETRANGE */+ result = SendMessageA(hProgressWnd, PBM_SETRANGE, 0, 100);+ ok(LOWORD(result) == 0, "Expected 0, got %d\n", LOWORD(result));+ ok(HIWORD(result) == 100, "Expected 100, got %d\n", HIWORD(result));++ /* PBM_SETRANGE32 */+ result32 = SendMessageA(hProgressWnd, PBM_SETRANGE32, 100, 0);+ ok(LOWORD(result32) == 100, "Expected 0, got %d\n", LOWORD(result32));+ ok(HIWORD(result32) == 0, "Expected 100, got %d\n", HIWORD(result32));++}++static void test_setColor(void)+{+ RECT client_rect;+ int result, result32;+ update_window(hProgressWnd);++ /* PBM_SETBARCOLOR */+ result = SendMessageA(hProgressWnd, PBM_SETBARCOLOR, 0, RGB(255,0,0));+ ok(result == RGB(255,0,0), "expected color, since PBM_SETBARCOLOR returns 0"); +}++static void test_redraw(void)+{+ RECT client_rect;+ int result; SendMessageA(hProgressWnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0); SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0); update_window(hProgressWnd); + /* PBM_GETPOS */+ SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);+ result = SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0);+ ok( result == 10, "expected 10, PBM_GETPOS must return the value of the set position\n");+ + /* PBM_SETSTEP */+ result = SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0);+ ok(result == 20, "expected 20, since return step = wParam");++ /* PBM_SETPOS */ ok(SendMessageA(hProgressWnd, PBM_SETPOS, 50, 0) == 10, "PBM_SETPOS must return the previous position\n"); ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n");@@ -198,8 +239,9 @@ START_TEST(progress) { init();- + test_setRange(); test_redraw(); cleanup(); }+
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20070301/954e1212/attachment.html
More information about the wine-patches
mailing list