From 13ab99b404d4253403a27dac7b6e3dd58e32fbee Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 2 May 2008 13:59:06 +0200 Subject: [PATCH] richedit: Avoid strlen in traces. --- dlls/riched20/tests/editor.c | 12 ++++-------- dlls/riched32/tests/editor.c | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 0fe696fd1cc..0aa1148807a 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -829,8 +829,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); @@ -839,8 +838,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); DestroyWindow(hwndRichEdit); @@ -859,16 +857,14 @@ static void test_EM_GETSELTEXT(void) SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); DestroyWindow(hwndRichEdit); diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index 9b12ba8906d..ff82654ff6e 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -489,8 +489,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 12; result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 8, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect1)); + ok(result == 8, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect1, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); @@ -499,8 +498,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect2)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); @@ -522,16 +520,14 @@ static void test_EM_GETSELTEXT(void) SendMessage(hwndRichEdit, EM_SETSEL, 4, 12); result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 8, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect1)); + ok(result == 8, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect1, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld, expected %d\n", - result, strlen(expect2)); + ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); ok(!strcmp(expect2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);