Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
be7d4257
Commit
be7d4257
authored
Feb 24, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Tests for IMXAttributes::clear().
parent
8a0d8683
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
saxreader.c
dlls/msxml3/tests/saxreader.c
+83
-0
No files found.
dlls/msxml3/tests/saxreader.c
View file @
be7d4257
...
...
@@ -3092,6 +3092,22 @@ static const addattribute_test_t addattribute_data[] = {
{
&
CLSID_SAXAttributes30
,
NULL
,
NULL
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes40
,
NULL
,
NULL
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes60
,
NULL
,
NULL
,
"ns:qname"
,
NULL
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes
,
NULL
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes30
,
NULL
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes40
,
NULL
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes60
,
NULL
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes
,
"uri"
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes30
,
"uri"
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes40
,
"uri"
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
E_INVALIDARG
},
{
&
CLSID_SAXAttributes60
,
"uri"
,
"qname"
,
"ns:qname"
,
NULL
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes
,
"uri"
,
"qname"
,
"ns:qname"
,
"type"
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes30
,
"uri"
,
"qname"
,
"ns:qname"
,
"type"
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes40
,
"uri"
,
"qname"
,
"ns:qname"
,
"type"
,
"value"
,
S_OK
},
{
&
CLSID_SAXAttributes60
,
"uri"
,
"qname"
,
"ns:qname"
,
"type"
,
"value"
,
S_OK
},
{
NULL
}
};
...
...
@@ -3156,6 +3172,72 @@ static void test_mxattr_addAttribute(void)
free_bstrs
();
}
static
void
test_mxattr_clear
(
void
)
{
ISAXAttributes
*
saxattr
;
IMXAttributes
*
mxattr
;
const
WCHAR
*
ptr
;
HRESULT
hr
;
int
len
;
hr
=
CoCreateInstance
(
&
CLSID_SAXAttributes
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMXAttributes
,
(
void
**
)
&
mxattr
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IMXAttributes_QueryInterface
(
mxattr
,
&
IID_ISAXAttributes
,
(
void
**
)
&
saxattr
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
&
ptr
,
&
len
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
IMXAttributes_addAttribute
(
mxattr
,
_bstr_
(
"uri"
),
_bstr_
(
"local"
),
_bstr_
(
"qname"
),
_bstr_
(
"type"
),
_bstr_
(
"value"
));
EXPECT_HR
(
hr
,
S_OK
);
len
=
-
1
;
hr
=
ISAXAttributes_getLength
(
saxattr
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
1
,
"got %d
\n
"
,
len
);
len
=
-
1
;
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
NULL
,
&
len
);
EXPECT_HR
(
hr
,
E_POINTER
);
ok
(
len
==
-
1
,
"got %d
\n
"
,
len
);
ptr
=
(
void
*
)
0xdeadbeef
;
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
&
ptr
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
ok
(
ptr
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
ptr
);
len
=
0
;
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
&
ptr
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
5
,
"got %d
\n
"
,
len
);
ok
(
!
lstrcmpW
(
ptr
,
_bstr_
(
"qname"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
ptr
));
hr
=
IMXAttributes_clear
(
mxattr
);
EXPECT_HR
(
hr
,
S_OK
);
len
=
-
1
;
hr
=
ISAXAttributes_getLength
(
saxattr
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
0
,
"got %d
\n
"
,
len
);
len
=
-
1
;
ptr
=
(
void
*
)
0xdeadbeef
;
hr
=
ISAXAttributes_getQName
(
saxattr
,
0
,
&
ptr
,
&
len
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
len
==
-
1
,
"got %d
\n
"
,
len
);
ok
(
ptr
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
ptr
);
IMXAttributes_Release
(
mxattr
);
ISAXAttributes_Release
(
saxattr
);
free_bstrs
();
}
START_TEST
(
saxreader
)
{
ISAXXMLReader
*
reader
;
...
...
@@ -3208,6 +3290,7 @@ START_TEST(saxreader)
if
(
is_clsid_supported
(
&
CLSID_SAXAttributes
,
mxattributes_support_data
))
{
test_mxattr_addAttribute
();
test_mxattr_clear
();
}
else
skip
(
"SAXAttributes not supported
\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