mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
msxml3/tests: Added more tests to ISAXXMLReader_putContentHandler and ISAXXMLReader_getContentHandler, added todo test for ISAXXMLReader_parse.
This commit is contained in:
parent
b2ebf709ff
commit
088f3eef9c
@ -29,6 +29,14 @@
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
static const WCHAR szSimpleXML[] = {
|
||||
'<','?','x','m','l',' ','v','e','r','s','i','o','n','=','\"','1','.','0','\"',' ','?','>','\n',
|
||||
'<','B','a','n','k','A','c','c','o','u','n','t','>','\n',
|
||||
' ',' ',' ','<','N','u','m','b','e','r','>','1','2','3','4','<','/','N','u','m','b','e','r','>','\n',
|
||||
' ',' ',' ','<','N','a','m','e','>','C','a','p','t','a','i','n',' ','A','h','a','b','<','/','N','a','m','e','>','\n',
|
||||
'<','/','B','a','n','k','A','c','c','o','u','n','t','>','\n','\0'
|
||||
};
|
||||
|
||||
typedef struct _contenthandler
|
||||
{
|
||||
const struct ISAXContentHandlerVtbl *lpContentHandlerVtbl;
|
||||
@ -192,6 +200,8 @@ static void test_saxreader(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
ISAXXMLReader *reader = NULL;
|
||||
VARIANT var;
|
||||
ISAXContentHandler *lpContentHandler;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SAXXMLReader, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISAXXMLReader, (LPVOID*)&reader);
|
||||
@ -202,9 +212,28 @@ static void test_saxreader(void)
|
||||
return;
|
||||
}
|
||||
|
||||
hr = ISAXXMLReader_getContentHandler(reader, &lpContentHandler);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
ok(lpContentHandler == NULL, "Expected %p, got %p\n", NULL, lpContentHandler);
|
||||
|
||||
hr = ISAXXMLReader_putContentHandler(reader, NULL);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
|
||||
hr = ISAXXMLReader_putContentHandler(reader, &contentHandler);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
|
||||
hr = ISAXXMLReader_getContentHandler(reader, &lpContentHandler);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
ok(lpContentHandler == &contentHandler, "Expected %p, got %p\n", &contentHandler, lpContentHandler);
|
||||
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(szSimpleXML);
|
||||
|
||||
hr = ISAXXMLReader_parse(reader, var);
|
||||
todo_wine {
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
}
|
||||
|
||||
ISAXXMLReader_Release(reader);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user