msxml3: Compile tests with __WINESRC__ defined.

This commit is contained in:
Jacek Caban 2013-11-16 16:07:21 +01:00 committed by Alexandre Julliard
parent fe0f945769
commit 66677e616f
6 changed files with 18 additions and 15 deletions

View File

@ -1,6 +1,5 @@
TESTDLL = msxml3.dll TESTDLL = msxml3.dll
IMPORTS = oleaut32 ole32 user32 IMPORTS = oleaut32 ole32 user32
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \ C_SRCS = \
domdoc.c \ domdoc.c \

View File

@ -30,6 +30,7 @@
#include "windows.h" #include "windows.h"
#include "xmldom.h"
#include "msxml2.h" #include "msxml2.h"
#include "msxml2did.h" #include "msxml2did.h"
#include "ole2.h" #include "ole2.h"
@ -1068,7 +1069,7 @@ static void node_to_string(IXMLDOMNode *node, char *buf)
else else
{ {
r = IXMLDOMNode_get_parentNode(node, &new_node); r = IXMLDOMNode_get_parentNode(node, &new_node);
wsprintf(buf, "%d", get_node_position(node)); sprintf(buf, "%d", get_node_position(node));
buf += strlen(buf); buf += strlen(buf);
} }
@ -6039,7 +6040,7 @@ static void test_save(void)
ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n"); ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n");
CloseHandle(hfile); CloseHandle(hfile);
DeleteFile("test.xml"); DeleteFileA("test.xml");
/* save to path VT_BSTR | VT_BYREF */ /* save to path VT_BSTR | VT_BYREF */
filename = _bstr_("test.xml"); filename = _bstr_("test.xml");
@ -6060,7 +6061,7 @@ static void test_save(void)
ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n"); ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n");
CloseHandle(hfile); CloseHandle(hfile);
DeleteFile("test.xml"); DeleteFileA("test.xml");
} }
/* save to stream */ /* save to stream */
@ -6679,7 +6680,7 @@ static void test_TransformWithLoadingLocalFile(void)
IXMLDOMDocument_Release(doc); IXMLDOMDocument_Release(doc);
IXMLDOMDocument_Release(xsl); IXMLDOMDocument_Release(xsl);
DeleteFile(lpPathBuffer); DeleteFileA(lpPathBuffer);
free_bstrs(); free_bstrs();
} }

View File

@ -3497,15 +3497,17 @@ static void test_mxwriter_startendelement_batch(const struct writer_startendelem
if (table->type & StartElement) if (table->type & StartElement)
{ {
hr = ISAXContentHandler_startElement(content, _bstr_(table->uri), lstrlen(table->uri), hr = ISAXContentHandler_startElement(content, _bstr_(table->uri), table->uri ? strlen(table->uri) : 0,
_bstr_(table->local_name), lstrlen(table->local_name), _bstr_(table->qname), lstrlen(table->qname), table->attr); _bstr_(table->local_name), table->local_name ? strlen(table->local_name) : 0, _bstr_(table->qname),
table->qname ? strlen(table->qname) : 0, table->attr);
ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr); ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr);
} }
if (table->type & EndElement) if (table->type & EndElement)
{ {
hr = ISAXContentHandler_endElement(content, _bstr_(table->uri), lstrlen(table->uri), hr = ISAXContentHandler_endElement(content, _bstr_(table->uri), table->uri ? strlen(table->uri) : 0,
_bstr_(table->local_name), lstrlen(table->local_name), _bstr_(table->qname), lstrlen(table->qname)); _bstr_(table->local_name), table->local_name ? strlen(table->local_name) : 0, _bstr_(table->qname),
table->qname ? strlen(table->qname) : 0);
ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr); ok(hr == table->hr, "test %d: got 0x%08x, expected 0x%08x\n", i, hr, table->hr);
} }

View File

@ -27,6 +27,7 @@
#include "windows.h" #include "windows.h"
#include "ole2.h" #include "ole2.h"
#include "msxml2.h" #include "msxml2.h"
#undef CLSID_DOMDocument
#include "msxml2did.h" #include "msxml2did.h"
#include "dispex.h" #include "dispex.h"

View File

@ -38,8 +38,8 @@
static void create_xml_file(LPCSTR filename) static void create_xml_file(LPCSTR filename)
{ {
DWORD dwNumberOfBytesWritten; DWORD dwNumberOfBytesWritten;
HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, HANDLE hf = CreateFileA(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
static const char data[] = static const char data[] =
"<?xml version=\"1.0\" ?>\n" "<?xml version=\"1.0\" ?>\n"
@ -61,8 +61,8 @@ static void create_stream_on_file(IStream **stream, LPCSTR path)
HRESULT hr; HRESULT hr;
DWORD file_size, read; DWORD file_size, read;
hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, hfile = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n");
file_size = GetFileSize(hfile, NULL); file_size = GetFileSize(hfile, NULL);

View File

@ -242,9 +242,9 @@ static void test_Load(void)
IBindCtx_Release(bctx); IBindCtx_Release(bctx);
IMoniker_Release(mon); IMoniker_Release(mon);
while(!loaded && GetMessage(&msg, NULL, 0, 0)) { while(!loaded && GetMessageA(&msg, NULL, 0, 0)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessageA(&msg);
} }
hres = IHTMLDocument2_get_body(html_doc, &elem); hres = IHTMLDocument2_get_body(html_doc, &elem);