Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d148ca4e
Commit
d148ca4e
authored
Nov 02, 2005
by
Stefan Huehner
Committed by
Alexandre Julliard
Nov 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend get_nodeName add testcases for it.
parent
451ef3a9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
node.c
dlls/msxml3/node.c
+6
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+30
-2
No files found.
dlls/msxml3/node.c
View file @
d148ca4e
...
...
@@ -178,6 +178,9 @@ static HRESULT WINAPI xmlnode_get_nodeName(
TRACE
(
"%p
\n
"
,
This
);
if
(
!
name
)
return
E_INVALIDARG
;
if
(
!
This
->
node
)
return
E_FAIL
;
...
...
@@ -186,6 +189,9 @@ static HRESULT WINAPI xmlnode_get_nodeName(
case
XML_TEXT_NODE
:
str
=
(
const
xmlChar
*
)
"#text"
;
break
;
case
XML_DOCUMENT_NODE
:
str
=
(
const
xmlChar
*
)
"#document"
;
break
;
default:
str
=
This
->
node
->
name
;
break
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
d148ca4e
...
...
@@ -64,6 +64,9 @@ static const WCHAR szComplete4[] = {
static
const
WCHAR
szNonExistentFile
[]
=
{
'c'
,
':'
,
'\\'
,
'N'
,
'o'
,
'n'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
szDocument
[]
=
{
'#'
,
'd'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
szOpen
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
static
const
WCHAR
szdl
[]
=
{
'd'
,
'l'
,
0
};
...
...
@@ -98,9 +101,9 @@ void test_domdoc( void )
ok
(
r
==
S_FALSE
,
"loadXML failed
\n
"
);
ok
(
b
==
VARIANT_FALSE
,
"failed to load XML string
\n
"
);
/* try to l
ao
d an document from an non-existent file */
/* try to l
oa
d an document from an non-existent file */
b
=
VARIANT_TRUE
;
str
=
SysAllocString
(
szNonExistentFile
);
str
=
SysAllocString
(
szNonExistentFile
);
VariantInit
(
&
var
);
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
str
;
...
...
@@ -151,6 +154,19 @@ void test_domdoc( void )
ok
(
r
==
S_OK
,
"should be no document element
\n
"
);
}
/* check if nodename is correct */
r
=
IXMLDOMDocument_get_nodeName
(
doc
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"get_nodeName (NULL) wrong code"
);
/* content doesn't matter here */
str
=
SysAllocString
(
szNonExistentFile
);
r
=
IXMLDOMDocument_get_nodeName
(
doc
,
&
str
);
ok
(
r
==
S_OK
,
"get_nodeName wrong code
\n
"
);
ok
(
str
!=
NULL
,
"str is null
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szDocument
),
"incorrect nodeName
\n
"
);
SysFreeString
(
str
);
/* check that there's no document element */
element
=
NULL
;
r
=
IXMLDOMDocument_get_documentElement
(
doc
,
&
element
);
...
...
@@ -279,6 +295,18 @@ void test_domnode( void )
ok
(
r
==
S_OK
,
"get_baseName returned wrong code
\n
"
);
ok
(
lstrcmpW
(
str
,
szlc
)
==
0
,
"basename was wrong
\n
"
);
/* check if nodename is correct */
r
=
IXMLDOMElement_get_nodeName
(
element
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"get_nodeName (NULL) wrong code"
);
/* content doesn't matter here */
str
=
SysAllocString
(
szNonExistentFile
);
r
=
IXMLDOMElement_get_nodeName
(
element
,
&
str
);
ok
(
r
==
S_OK
,
"get_nodeName wrong code
\n
"
);
ok
(
str
!=
NULL
,
"str is null
\n
"
);
ok
(
!
lstrcmpW
(
str
,
szlc
),
"incorrect nodeName
\n
"
);
SysFreeString
(
str
);
r
=
IXMLDOMElement_get_attributes
(
element
,
&
map
);
ok
(
r
==
S_OK
,
"get_attributes returned wrong code
\n
"
);
ok
(
map
!=
NULL
,
"should be attributes
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment