Module: wine Branch: master Commit: 6a12d679b08c6c35e7d1a121f4009534660b32fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a12d679b08c6c35e7d1a121f4...
Author: Hans Leidekker hans@it.vu.nl Date: Tue Jan 23 11:02:51 2007 +0100
usp10: Remove duplicate font selection code from the tests.
---
dlls/usp10/tests/usp10.c | 50 +++++++++------------------------------------ 1 files changed, 10 insertions(+), 40 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 3bd6257..40840c3 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -61,23 +61,8 @@ static void test_ScriptItemIzeShapePlace int piAdvance[256]; GOFFSET pGoffset[256]; ABC pABC[256]; - LOGFONTA lf; - HFONT zfont; int cnt;
- - lstrcpyA(lf.lfFaceName, "Symbol"); - lf.lfHeight = 10; - lf.lfItalic = 0; - lf.lfEscapement = 0; - lf.lfOrientation = 0; - lf.lfUnderline = 0; - lf.lfStrikeOut = 0; - lf.lfWeight = 3; - lf.lfWidth = 10; - - zfont = (HFONT) SelectObject(hdc, CreateFontIndirectA(&lf)); - /* Start testing usp10 functions */ /* This test determines that the pointer returned by ScriptGetProperties is valid * by checking a known value in the table */ @@ -711,23 +696,6 @@ static void test_ScriptStringXtoCP_CPtoX int X; BOOL fTrailing;
- LOGFONTA lf; - HFONT zfont; - - lstrcpyA(lf.lfFaceName, "Symbol"); - lf.lfHeight = 10; - lf.lfCharSet = 0; - lf.lfItalic = 0; - lf.lfEscapement = 0; - lf.lfOrientation = 0; - lf.lfUnderline = 0; - lf.lfStrikeOut = 0; - lf.lfWeight = 400; - lf.lfWidth = 0; - lf.lfPitchAndFamily = 0; - - zfont = (HFONT) SelectObject(hdc, CreateFontIndirectA(&lf)); - /* Test with hdc, this should be a valid test * Here we generrate an SCRIPT_STRING_ANALYSIS that will be used as input to the * following character positions to X and X to character position functions. @@ -880,17 +848,9 @@ static void test_ScriptCacheGetHeight(HD static void test_ScriptGetGlyphABCWidth(HDC hdc) { HRESULT hr; - LOGFONTA lf; - HFONT hfont; SCRIPT_CACHE sc = NULL; ABC abc;
- memset(&lf, 0, sizeof(lf)); - - lstrcpyA(lf.lfFaceName, "Symbol"); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - hr = ScriptGetGlyphABCWidth(NULL, NULL, 'a', NULL); ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr);
@@ -1239,6 +1199,8 @@ START_TEST(usp10) { HWND hwnd; HDC hdc; + LOGFONTA lf; + HFONT hfont;
unsigned short pwOutGlyphs[256];
@@ -1253,6 +1215,14 @@ START_TEST(usp10) hdc = GetDC(hwnd); /* We now have a hdc */ ok( hdc != NULL, "HDC failed to be created %p\n", hdc);
+ memset(&lf, 0, sizeof(HFONT)); + lstrcpyA(lf.lfFaceName, "Symbol"); + lf.lfHeight = 10; + lf.lfWeight = 3; + lf.lfWidth = 10; + + hfont = SelectObject(hdc, CreateFontIndirectA(&lf)); + test_ScriptItemIzeShapePlace(hdc,pwOutGlyphs); test_ScriptGetCMap(hdc, pwOutGlyphs); test_ScriptCacheGetHeight(hdc);