You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
From ab8673852c2b53cf96fca841687cdf482b729510 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
|
Date: Sun, 27 Dec 2015 18:16:42 +0100
|
|
Subject: oleaut32/tests: Test SysStringLen() on string allocated with
|
|
SysAllocStringByteLen.
|
|
|
|
---
|
|
dlls/oleaut32/tests/vartype.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
|
|
index d905d37..975922f 100644
|
|
--- a/dlls/oleaut32/tests/vartype.c
|
|
+++ b/dlls/oleaut32/tests/vartype.c
|
|
@@ -5515,6 +5515,7 @@ static void test_SysAllocStringByteLen(void)
|
|
ok (str != NULL, "Expected non-NULL\n");
|
|
bstr = Get(str);
|
|
ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
|
+ ok (SysStringLen(str) == i/sizeof(WCHAR), "Expected %d, got %d\n", i/sizeof(WCHAR), SysStringLen(str));
|
|
ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
|
SysFreeString(str);
|
|
|
|
@@ -5525,6 +5526,7 @@ static void test_SysAllocStringByteLen(void)
|
|
ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
|
buf[i] = 0;
|
|
ok (!lstrcmpA((LPCSTR)bstr->szString, buf), "String different\n");
|
|
+ ok (SysStringLen(str) == i/sizeof(WCHAR), "Expected %d, got %d\n", i/sizeof(WCHAR), SysStringLen(str));
|
|
ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
|
SysFreeString(str);
|
|
}
|
|
--
|
|
2.6.4
|
|
|