msxml3: Stopped seg faults during regression tests on windows.

This commit is contained in:
Alistair Leslie-Hughes 2008-03-04 21:09:06 +11:00 committed by Alexandre Julliard
parent 2bbb39d601
commit 8ac57e940b
1 changed files with 5 additions and 17 deletions

View File

@ -2316,6 +2316,7 @@ static void test_xmlTypes(void)
hr = IXMLDOMElement_get_xml(pElement, &str); hr = IXMLDOMElement_get_xml(pElement, &str);
ok(hr == S_OK, "ret %08x\n", hr ); ok(hr == S_OK, "ret %08x\n", hr );
ok( !lstrcmpW( str, szElementXML3 ), "incorrect element xml\n"); ok( !lstrcmpW( str, szElementXML3 ), "incorrect element xml\n");
SysFreeString(str);
IXMLDOMElement_Release(pElement); IXMLDOMElement_Release(pElement);
} }
@ -2391,18 +2392,18 @@ static void test_xmlTypes(void)
SysFreeString(str); SysFreeString(str);
/* test length property */ /* test length property */
hr = IXMLDOMCDATASection_get_length(pComment, &len); hr = IXMLDOMCDATASection_get_length(pCDataSec, &len);
ok(hr == S_OK, "ret %08x\n", hr ); ok(hr == S_OK, "ret %08x\n", hr );
ok(len == 21, "expected 21 got %ld\n", len); ok(len == 21, "expected 21 got %ld\n", len);
/* test get nodeValue */ /* test get nodeValue */
hr = IXMLDOMCDATASection_get_nodeValue(pComment, &var); hr = IXMLDOMCDATASection_get_nodeValue(pCDataSec, &var);
ok(hr == S_OK, "ret %08x\n", hr ); ok(hr == S_OK, "ret %08x\n", hr );
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
VariantClear(&var); VariantClear(&var);
/* test get data */ /* test get data */
hr = IXMLDOMCDATASection_get_data(pComment, &str); hr = IXMLDOMCDATASection_get_data(pCDataSec, &str);
ok(hr == S_OK, "ret %08x\n", hr ); ok(hr == S_OK, "ret %08x\n", hr );
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
SysFreeString(str); SysFreeString(str);
@ -2470,7 +2471,7 @@ static void test_xmlTypes(void)
ok( !lstrcmpW( str, _bstr_("documentfragment") ), "incorrect nodeTypeString string\n"); ok( !lstrcmpW( str, _bstr_("documentfragment") ), "incorrect nodeTypeString string\n");
SysFreeString(str); SysFreeString(str);
IXMLDOMDocumentFragment_Release(pCDataSec); IXMLDOMDocumentFragment_Release(pDocFrag);
} }
/* Entity References */ /* Entity References */
@ -2696,19 +2697,6 @@ static void test_nodeTypeTests( void )
IXMLDOMElement_Release(pElement); IXMLDOMElement_Release(pElement);
} }
/* Byte */
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_byte"), &pElement);
ok(hr == S_OK, "ret %08x\n", hr );
if(hr == S_OK)
{
IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL);
hr = IXMLDOMElement_put_dataType(pElement, _bstr_("byte") );
ok(hr == S_OK, "ret %08x\n", hr );
IXMLDOMElement_Release(pElement);
}
/* I2 */ /* I2 */
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_I2"), &pElement); hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_I2"), &pElement);
ok(hr == S_OK, "ret %08x\n", hr ); ok(hr == S_OK, "ret %08x\n", hr );