richedit: Fixed test failure that happend on older builds of riched20.dll.

This commit is contained in:
Dylan Smith 2008-09-29 13:33:52 -04:00 committed by Alexandre Julliard
parent 83d92f4195
commit c13fd6a44b
1 changed files with 9 additions and 2 deletions

View File

@ -1101,6 +1101,7 @@ static void test_SETPARAFORMAT(void)
HWND hwndRichEdit = new_richedit(NULL); HWND hwndRichEdit = new_richedit(NULL);
PARAFORMAT2 fmt; PARAFORMAT2 fmt;
HRESULT ret; HRESULT ret;
LONG expectedMask = PFM_ALL2 & ~PFM_TABLEROWDELIMITER;
fmt.cbSize = sizeof(PARAFORMAT2); fmt.cbSize = sizeof(PARAFORMAT2);
fmt.dwMask = PFM_ALIGNMENT; fmt.dwMask = PFM_ALIGNMENT;
fmt.wAlignment = PFA_LEFT; fmt.wAlignment = PFA_LEFT;
@ -1111,8 +1112,14 @@ static void test_SETPARAFORMAT(void)
fmt.cbSize = sizeof(PARAFORMAT2); fmt.cbSize = sizeof(PARAFORMAT2);
fmt.dwMask = -1; fmt.dwMask = -1;
ret = SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM) &fmt); ret = SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM) &fmt);
ok(ret == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, ret); /* Ignore the PFM_TABLEROWDELIMITER bit because it changes
ok(fmt.dwMask == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, fmt.dwMask); * between richedit different native builds of riched20.dll
* used on different Windows versions. */
ret &= ~PFM_TABLEROWDELIMITER;
fmt.dwMask &= ~PFM_TABLEROWDELIMITER;
ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret);
ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask);
DestroyWindow(hwndRichEdit); DestroyWindow(hwndRichEdit);
} }