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
493e406b
Commit
493e406b
authored
Feb 12, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Add a test for names and values parsed from an XML declaration.
parent
09f37192
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
reader.c
dlls/xmllite/tests/reader.c
+33
-1
No files found.
dlls/xmllite/tests/reader.c
View file @
493e406b
...
@@ -644,11 +644,21 @@ if (0)
...
@@ -644,11 +644,21 @@ if (0)
static
void
test_read_xmldeclaration
(
void
)
static
void
test_read_xmldeclaration
(
void
)
{
{
static
const
struct
{
WCHAR
name
[
12
];
WCHAR
val
[
12
];
}
name_val
[]
=
{
{
{
'v'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
},
{
'1'
,
'.'
,
'0'
,
0
}
},
{
{
'e'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
},
{
'U'
,
'T'
,
'F'
,
'-'
,
'8'
,
0
}
},
{
{
's'
,
't'
,
'a'
,
'n'
,
'd'
,
'a'
,
'l'
,
'o'
,
'n'
,
'e'
,
0
},
{
'y'
,
'e'
,
's'
,
0
}
}
};
IXmlReader
*
reader
;
IXmlReader
*
reader
;
IStream
*
stream
;
IStream
*
stream
;
HRESULT
hr
;
HRESULT
hr
;
XmlNodeType
type
;
XmlNodeType
type
;
UINT
count
=
0
;
UINT
count
=
0
,
len
,
i
;
const
WCHAR
*
val
;
const
WCHAR
*
val
;
hr
=
pCreateXmlReader
(
&
IID_IXmlReader
,
(
LPVOID
*
)
&
reader
,
NULL
);
hr
=
pCreateXmlReader
(
&
IID_IXmlReader
,
(
LPVOID
*
)
&
reader
,
NULL
);
...
@@ -730,6 +740,28 @@ static void test_read_xmldeclaration(void)
...
@@ -730,6 +740,28 @@ static void test_read_xmldeclaration(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
count
==
3
,
"Expected 3, got %d
\n
"
,
count
);
ok
(
count
==
3
,
"Expected 3, got %d
\n
"
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
len
=
0
;
hr
=
IXmlReader_GetLocalName
(
reader
,
&
val
,
&
len
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
len
==
lstrlenW
(
name_val
[
i
].
name
),
"expected %u, got %u
\n
"
,
lstrlenW
(
name_val
[
i
].
name
),
len
);
ok
(
!
lstrcmpW
(
name_val
[
i
].
name
,
val
),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
name_val
[
i
].
name
),
wine_dbgstr_w
(
val
));
len
=
0
;
hr
=
IXmlReader_GetValue
(
reader
,
&
val
,
&
len
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
len
==
lstrlenW
(
name_val
[
i
].
val
),
"expected %u, got %u
\n
"
,
lstrlenW
(
name_val
[
i
].
val
),
len
);
if
(
i
==
1
)
todo_wine
ok
(
!
lstrcmpW
(
name_val
[
i
].
val
,
val
),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
name_val
[
i
].
val
),
wine_dbgstr_w
(
val
));
else
ok
(
!
lstrcmpW
(
name_val
[
i
].
val
,
val
),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
name_val
[
i
].
val
),
wine_dbgstr_w
(
val
));
hr
=
IXmlReader_MoveToNextAttribute
(
reader
);
ok
(
hr
==
(
i
<
count
-
1
)
?
S_OK
:
S_FALSE
,
"got %08x
\n
"
,
hr
);
}
hr
=
IXmlReader_GetDepth
(
reader
,
&
count
);
hr
=
IXmlReader_GetDepth
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
count
==
1
,
"Expected 1, got %d
\n
"
,
count
);
ok
(
count
==
1
,
"Expected 1, got %d
\n
"
,
count
);
...
...
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