msxml3/tests: Win64 printf format warning fixes.

This commit is contained in:
Hans Leidekker 2006-10-13 13:09:49 +02:00 committed by Alexandre Julliard
parent 61faa6bb11
commit fe1f3b0da5
2 changed files with 88 additions and 88 deletions

View File

@ -5,7 +5,6 @@ VPATH = @srcdir@
TESTDLL = msxml3.dll
IMPORTS = oleaut32 ole32 kernel32
EXTRALIBS = -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
domdoc.c

View File

@ -152,7 +152,7 @@ void test_domdoc( void )
node = NULL;
str = SysAllocString( szstr1 );
r = IXMLDOMDocument_selectSingleNode( doc, str, &node );
ok( r == S_FALSE, "ret %08lx\n", r );
ok( r == S_FALSE, "ret %08x\n", r );
SysFreeString( str );
b = VARIANT_TRUE;
@ -255,10 +255,10 @@ void test_domdoc( void )
SysFreeString( str );
r = IXMLDOMDocument_get_parseError( doc, &error );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMParseError_get_errorCode( error, &code );
ok( r == S_FALSE, "returns %08lx\n", r );
ok( r == S_FALSE, "returns %08x\n", r );
ok( code == 0, "code %ld\n", code );
IXMLDOMParseError_Release( error );
@ -349,7 +349,7 @@ void test_domnode( void )
V_VT(&var) = VT_I4;
V_I4(&var) = 0x1234;
r = IXMLDOMElement_getAttribute( element, str, &var );
ok( r == E_FAIL, "getAttribute ret %08lx\n", r );
ok( r == E_FAIL, "getAttribute ret %08x\n", r );
ok( V_VT(&var) == VT_EMPTY, "vt = %x\n", V_VT(&var));
VariantClear(&var);
SysFreeString( str );
@ -358,7 +358,7 @@ void test_domnode( void )
V_VT(&var) = VT_I4;
V_I4(&var) = 0x1234;
r = IXMLDOMElement_getAttribute( element, str, &var );
ok( r == S_OK, "getAttribute ret %08lx\n", r );
ok( r == S_OK, "getAttribute ret %08x\n", r );
ok( V_VT(&var) == VT_BSTR, "vt = %x\n", V_VT(&var));
ok( !lstrcmpW(V_BSTR(&var), szstr1), "wrong attr value\n");
VariantClear( &var );
@ -380,12 +380,12 @@ void test_domnode( void )
{
ISupportErrorInfo *support_error;
r = IXMLDOMNamedNodeMap_QueryInterface( map, &IID_ISupportErrorInfo, (LPVOID*)&support_error );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = ISupportErrorInfo_InterfaceSupportsErrorInfo( support_error, &IID_IXMLDOMNamedNodeMap );
todo_wine
{
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
}
ISupportErrorInfo_Release( support_error );
@ -460,7 +460,7 @@ todo_wine
ok( lstrcmpW(str,szdl) == 0, "basename was wrong\n");
r = IXMLDOMNode_get_nodeValue( node, &var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( V_VT(&var) == VT_BSTR, "vt %x\n", V_VT(&var));
ok( !lstrcmpW(V_BSTR(&var), szstr1), "nodeValue incorrect\n");
VariantClear(&var);
@ -526,17 +526,17 @@ todo_wine
node = (void*)0xdeadbeef;
r = IXMLDOMNode_selectSingleNode( element, (BSTR)szdl, &node );
ok( r == S_FALSE, "ret %08lx\n", r );
ok( r == S_FALSE, "ret %08x\n", r );
ok( node == NULL, "node %p\n", node );
r = IXMLDOMNode_selectSingleNode( element, (BSTR)szbs, &node );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNode_Release( node );
ok( r == 0, "ret %08lx\n", r );
ok( r == 0, "ret %08x\n", r );
if (list)
{
r = IXMLDOMNodeList_get_length( list, &count );
ok( r == S_OK, "get_length returns %08lx\n", r );
ok( r == S_OK, "get_length returns %08x\n", r );
ok( count == 4, "get_length got %ld\n", count );
r = IXMLDOMNodeList_nextNode( list, &node );
@ -634,7 +634,7 @@ static void test_refs(void)
if( r != S_OK )
return;
ref = IXMLDOMDocument_Release(doc);
ok( ref == 0, "ref %ld\n", ref);
ok( ref == 0, "ref %d\n", ref);
r = CoCreateInstance( &CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
@ -648,9 +648,9 @@ static void test_refs(void)
SysFreeString( str );
ref = IXMLDOMDocument_AddRef( doc );
ok( ref == 2, "ref %ld\n", ref );
ok( ref == 2, "ref %d\n", ref );
ref = IXMLDOMDocument_AddRef( doc );
ok( ref == 3, "ref %ld\n", ref );
ok( ref == 3, "ref %d\n", ref );
IXMLDOMDocument_Release( doc );
IXMLDOMDocument_Release( doc );
@ -659,51 +659,51 @@ static void test_refs(void)
ok( element != NULL, "should be an element\n");
ref = IXMLDOMDocument_AddRef( doc );
ok( ref == 2, "ref %ld\n", ref );
ok( ref == 2, "ref %d\n", ref );
IXMLDOMDocument_Release( doc );
r = IXMLDOMElement_get_childNodes( element, &node_list );
ok( r == S_OK, "rets %08lx\n", r);
ok( r == S_OK, "rets %08x\n", r);
ref = IXMLDOMNodeList_AddRef( node_list );
ok( ref == 2, "ref %ld\n", ref );
ok( ref == 2, "ref %d\n", ref );
IXMLDOMNodeList_Release( node_list );
IXMLDOMNodeList_get_item( node_list, 0, &node );
ok( r == S_OK, "rets %08lx\n", r);
ok( r == S_OK, "rets %08x\n", r);
IXMLDOMNodeList_get_item( node_list, 0, &node2 );
ok( r == S_OK, "rets %08lx\n", r);
ok( r == S_OK, "rets %08x\n", r);
ref = IXMLDOMNode_AddRef( node );
ok( ref == 2, "ref %ld\n", ref );
ok( ref == 2, "ref %d\n", ref );
IXMLDOMNode_Release( node );
ref = IXMLDOMNode_Release( node );
ok( ref == 0, "ref %ld\n", ref );
ok( ref == 0, "ref %d\n", ref );
ref = IXMLDOMNode_Release( node2 );
ok( ref == 0, "ref %ld\n", ref );
ok( ref == 0, "ref %d\n", ref );
ref = IXMLDOMNodeList_Release( node_list );
ok( ref == 0, "ref %ld\n", ref );
ok( ref == 0, "ref %d\n", ref );
ok( node != node2, "node %p node2 %p\n", node, node2 );
ref = IXMLDOMDocument_Release( doc );
ok( ref == 0, "ref %ld\n", ref );
ok( ref == 0, "ref %d\n", ref );
ref = IXMLDOMElement_AddRef( element );
todo_wine {
ok( ref == 3, "ref %ld\n", ref );
ok( ref == 3, "ref %d\n", ref );
}
IXMLDOMElement_Release( element );
/* IUnknown must be unique however we obtain it */
r = IXMLDOMElement_QueryInterface( element, &IID_IUnknown, (LPVOID*)&unk );
ok( r == S_OK, "rets %08lx\n", r );
ok( r == S_OK, "rets %08x\n", r );
r = IXMLDOMElement_QueryInterface( element, &IID_IXMLDOMNode, (LPVOID*)&node );
ok( r == S_OK, "rets %08lx\n", r );
ok( r == S_OK, "rets %08x\n", r );
r = IXMLDOMNode_QueryInterface( node, &IID_IUnknown, (LPVOID*)&unk2 );
ok( r == S_OK, "rets %08lx\n", r );
ok( r == S_OK, "rets %08x\n", r );
ok( unk == unk2, "unk %p unk2 %p\n", unk, unk2 );
IUnknown_Release( unk2 );
@ -724,7 +724,8 @@ static void test_create(void)
IXMLDOMNode *root, *node, *child;
IXMLDOMNamedNodeMap *attr_map;
IUnknown *unk;
LONG ref, num;
LONG ref;
long num;
r = CoCreateInstance( &CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
@ -735,39 +736,39 @@ static void test_create(void)
V_I4(&var) = NODE_ELEMENT;
str = SysAllocString( szlc );
r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMDocument_appendChild( doc, node, &root );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( node == root, "%p %p\n", node, root );
ref = IXMLDOMNode_AddRef( node );
ok(ref == 3, "ref %ld\n", ref);
ok(ref == 3, "ref %d\n", ref);
IXMLDOMNode_Release( node );
ref = IXMLDOMNode_Release( node );
ok(ref == 1, "ref %ld\n", ref);
ok(ref == 1, "ref %d\n", ref);
SysFreeString( str );
V_VT(&var) = VT_I4;
V_I4(&var) = NODE_ELEMENT;
str = SysAllocString( szbs );
r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ref = IXMLDOMNode_AddRef( node );
ok(ref == 2, "ref = %ld\n", ref);
ok(ref == 2, "ref = %d\n", ref);
IXMLDOMNode_Release( node );
r = IXMLDOMNode_QueryInterface( node, &IID_IUnknown, (LPVOID*)&unk );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ref = IXMLDOMNode_AddRef( unk );
ok(ref == 3, "ref = %ld\n", ref);
ok(ref == 3, "ref = %d\n", ref);
IXMLDOMNode_Release( unk );
V_VT(&var) = VT_EMPTY;
r = IXMLDOMNode_insertBefore( root, (IXMLDOMNode*)unk, var, &child );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( unk == (IUnknown*)child, "%p %p\n", unk, child );
IXMLDOMNode_Release( child );
IUnknown_Release( unk );
@ -776,19 +777,19 @@ static void test_create(void)
V_VT(&var) = VT_NULL;
V_DISPATCH(&var) = (IDispatch*)node;
r = IXMLDOMNode_insertBefore( root, node, var, &child );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( node == child, "%p %p\n", node, child );
IXMLDOMNode_Release( child );
IXMLDOMNode_Release( node );
r = IXMLDOMNode_QueryInterface( root, &IID_IXMLDOMElement, (LPVOID*)&element );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMElement_get_attributes( element, &attr_map );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMNamedNodeMap_get_length( attr_map, &num );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( num == 0, "num %ld\n", num );
IXMLDOMNamedNodeMap_Release( attr_map );
@ -796,11 +797,11 @@ static void test_create(void)
V_BSTR(&var) = SysAllocString( szstr1 );
name = SysAllocString( szdl );
r = IXMLDOMElement_setAttribute( element, name, var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMElement_get_attributes( element, &attr_map );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMNamedNodeMap_get_length( attr_map, &num );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( num == 1, "num %ld\n", num );
IXMLDOMNamedNodeMap_Release( attr_map );
VariantClear(&var);
@ -808,16 +809,16 @@ static void test_create(void)
V_VT(&var) = VT_BSTR;
V_BSTR(&var) = SysAllocString( szstr2 );
r = IXMLDOMElement_setAttribute( element, name, var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMElement_get_attributes( element, &attr_map );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMNamedNodeMap_get_length( attr_map, &num );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( num == 1, "num %ld\n", num );
IXMLDOMNamedNodeMap_Release( attr_map );
VariantClear(&var);
r = IXMLDOMElement_getAttribute( element, name, &var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( !lstrcmpW(V_BSTR(&var), szstr2), "wrong attr value\n");
VariantClear(&var);
SysFreeString(name);
@ -826,11 +827,11 @@ static void test_create(void)
V_BSTR(&var) = SysAllocString( szstr1 );
name = SysAllocString( szlc );
r = IXMLDOMElement_setAttribute( element, name, var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMElement_get_attributes( element, &attr_map );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
r = IXMLDOMNamedNodeMap_get_length( attr_map, &num );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( num == 2, "num %ld\n", num );
IXMLDOMNamedNodeMap_Release( attr_map );
VariantClear(&var);
@ -840,10 +841,10 @@ static void test_create(void)
V_I4(&var) = 10;
name = SysAllocString( szbs );
r = IXMLDOMElement_setAttribute( element, name, var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
VariantClear(&var);
r = IXMLDOMElement_getAttribute( element, name, &var );
ok( r == S_OK, "returns %08lx\n", r );
ok( r == S_OK, "returns %08x\n", r );
ok( V_VT(&var) == VT_BSTR, "variant type %x\n", V_VT(&var));
VariantClear(&var);
SysFreeString(name);
@ -860,7 +861,7 @@ static void test_getElementsByTagName(void)
VARIANT_BOOL b;
IXMLDOMDocument *doc;
IXMLDOMNodeList *node_list;
LONG len;
long len;
r = CoCreateInstance( &CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
@ -875,36 +876,36 @@ static void test_getElementsByTagName(void)
str = SysAllocString( szstar );
r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list);
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNodeList_get_length( node_list, &len );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( len == 6, "len %ld\n", len );
IXMLDOMNodeList_Release( node_list );
SysFreeString( str );
str = SysAllocString( szbs );
r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list);
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNodeList_get_length( node_list, &len );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( len == 1, "len %ld\n", len );
IXMLDOMNodeList_Release( node_list );
SysFreeString( str );
str = SysAllocString( szdl );
r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list);
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNodeList_get_length( node_list, &len );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( len == 0, "len %ld\n", len );
IXMLDOMNodeList_Release( node_list );
SysFreeString( str );
str = SysAllocString( szstr1 );
r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list);
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNodeList_get_length( node_list, &len );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( len == 0, "len %ld\n", len );
IXMLDOMNodeList_Release( node_list );
SysFreeString( str );
@ -935,15 +936,15 @@ static void test_get_text(void)
str = SysAllocString( szbs );
r = IXMLDOMDocument_getElementsByTagName( doc, str, &node_list );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
SysFreeString(str);
r = IXMLDOMNodeList_get_item( node_list, 0, &node );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
IXMLDOMNodeList_Release( node_list );
r = IXMLDOMNode_get_text( node, &str );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
todo_wine {
ok( !memcmp(str, szfn1_txt, sizeof(szfn1_txt)), "wrong string\n" );
}
@ -951,23 +952,23 @@ todo_wine {
SysFreeString(str);
r = IXMLDOMNode_get_attributes( node, &node_map );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
str = SysAllocString( szvr );
r = IXMLDOMNamedNodeMap_getNamedItem( node_map, str, &node2 );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
SysFreeString(str);
r = IXMLDOMNode_get_text( node2, &str );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( !memcmp(str, szstr2, sizeof(szstr2)), "wrong string\n" );
SysFreeString(str);
r = IXMLDOMNode_get_firstChild( node2, &node3 );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
r = IXMLDOMNode_get_text( node3, &str );
ok( r == S_OK, "ret %08lx\n", r );
ok( r == S_OK, "ret %08x\n", r );
ok( !memcmp(str, szstr2, sizeof(szstr2)), "wrong string\n" );
SysFreeString(str);
@ -1002,27 +1003,27 @@ static void test_get_childNodes(void)
SysFreeString( str );
r = IXMLDOMDocument_get_documentElement( doc, &element );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMElement_get_childNodes( element, &node_list );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNodeList_get_length( node_list, &len );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
ok( len == 4, "len %ld\n", len);
r = IXMLDOMNodeList_get_item( node_list, 2, &node );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNode_get_childNodes( node, &node_list2 );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNodeList_get_length( node_list2, &len );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
ok( len == 0, "len %ld\n", len);
r = IXMLDOMNodeList_get_item( node_list2, 0, &node2);
ok( r == S_FALSE, "ret %08lx\n", r);
ok( r == S_FALSE, "ret %08x\n", r);
IXMLDOMNodeList_Release( node_list2 );
IXMLDOMNode_Release( node );
@ -1053,29 +1054,29 @@ static void test_removeChild(void)
SysFreeString( str );
r = IXMLDOMDocument_get_documentElement( doc, &element );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMElement_get_childNodes( element, &node_list );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNodeList_get_item( node_list, 3, &node );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNode_get_childNodes( node, &node_list2 );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMNodeList_get_item( node_list, 0, &node4 );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
r = IXMLDOMElement_removeChild( element, NULL, &node2 );
ok( r == E_INVALIDARG, "ret %08lx\n", r );
ok( r == E_INVALIDARG, "ret %08x\n", r );
r = IXMLDOMElement_removeChild( element, node4, &node2 );
ok( r == S_OK, "ret %08lx\n", r);
ok( r == S_OK, "ret %08x\n", r);
ok( node4 == node2, "node %p node2 %p\n", node4, node2 );
r = IXMLDOMNode_get_parentNode( node4, &node3 );
ok( r == S_FALSE, "ret %08lx\n", r);
ok( r == S_FALSE, "ret %08x\n", r);
ok( node3 == NULL, "%p\n", node3 );
IXMLDOMNode_Release( node2 );