From 9730971e8eca05edff23d8268d65e2bf8c360cd6 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 12 Sep 2018 16:25:51 +0300 Subject: [PATCH] xmllite/tests: Add another test for WriteAttributeString(). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/xmllite/tests/writer.c | 62 ++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 87cdaabce15..972eb96d9b2 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -1572,6 +1572,27 @@ static void test_indentation(void) IXmlWriter_Release(writer); } +static HRESULT write_attribute_string(IXmlWriter *writer, const char *prefix, const char *local, + const char *uri, const char *value) +{ + WCHAR *prefixW, *localW, *uriW, *valueW; + HRESULT hr; + + prefixW = strdupAtoW(prefix); + localW = strdupAtoW(local); + uriW = strdupAtoW(uri); + valueW = strdupAtoW(value); + + hr = IXmlWriter_WriteAttributeString(writer, prefixW, localW, uriW, valueW); + + heap_free(prefixW); + heap_free(localW); + heap_free(uriW); + heap_free(valueW); + + return hr; +} + static void test_WriteAttributeString(void) { static const struct @@ -1589,6 +1610,7 @@ static void test_WriteAttributeString(void) { NULL, "a", NULL, "b", "", "", "", "", "", "", ""); + ""); IXmlWriter_Release(writer); IStream_Release(stream);