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
80a546ca
Commit
80a546ca
authored
Jan 19, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Add basic test structure for IXmlReader.
parent
ea762fd2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
163 additions
and
1 deletion
+163
-1
configure
configure
+9
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/xmllite/Makefile.in
+1
-0
reader.c
dlls/xmllite/reader.c
+38
-0
Makefile.in
dlls/xmllite/tests/Makefile.in
+13
-0
reader.c
dlls/xmllite/tests/reader.c
+100
-0
xmllite.spec
dlls/xmllite/xmllite.spec
+1
-1
No files found.
configure
View file @
80a546ca
...
...
@@ -17409,6 +17409,14 @@ dlls/xmllite/Makefile: dlls/xmllite/Makefile.in dlls/Makedll.rules"
ac_config_files
=
"
$ac_config_files
dlls/xmllite/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
dlls/xmllite/tests/Makefile"
test
"x
$enable_tests
"
!=
xno
&&
ALL_TEST_DIRS
=
"
$ALL_TEST_DIRS
\\
xmllite/tests"
ALL_MAKEFILE_DEPENDS
=
"
$ALL_MAKEFILE_DEPENDS
dlls/xmllite/tests/Makefile: dlls/xmllite/tests/Makefile.in dlls/Maketest.rules"
ac_config_files
=
"
$ac_config_files
dlls/xmllite/tests/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
documentation/Makefile"
test
"x
$enable_documentation
"
!=
xno
&&
ALL_TOP_DIRS
=
"
$ALL_TOP_DIRS
\\
documentation"
...
...
@@ -19218,6 +19226,7 @@ do
"dlls/xinput1_3/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/xinput1_3/tests/Makefile" ;;
"dlls/xinput9_1_0/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/xinput9_1_0/Makefile" ;;
"dlls/xmllite/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/xmllite/Makefile" ;;
"dlls/xmllite/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/xmllite/tests/Makefile" ;;
"documentation/Makefile") CONFIG_FILES="
$CONFIG_FILES
documentation/Makefile" ;;
"fonts/Makefile") CONFIG_FILES="
$CONFIG_FILES
fonts/Makefile" ;;
"include/Makefile") CONFIG_FILES="
$CONFIG_FILES
include/Makefile" ;;
...
...
configure.ac
View file @
80a546ca
...
...
@@ -2587,6 +2587,7 @@ WINE_CONFIG_MAKEFILE([dlls/xinput1_3/Makefile],[dlls/Makedll.rules],[dlls],[ALL_
WINE_CONFIG_MAKEFILE([dlls/xinput1_3/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/xinput9_1_0/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/xmllite/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/xmllite/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([documentation/Makefile],[Make.rules],[],[ALL_TOP_DIRS])
WINE_CONFIG_MAKEFILE([fonts/Makefile],[Make.rules],[],[ALL_TOP_DIRS])
WINE_CONFIG_MAKEFILE([include/Makefile],[Make.rules],[],[ALL_TOP_DIRS])
...
...
dlls/xmllite/Makefile.in
View file @
80a546ca
...
...
@@ -6,6 +6,7 @@ MODULE = xmllite.dll
IMPORTS
=
kernel32
C_SRCS
=
\
reader.c
\
xmllite_main.c
@MAKE_DLL_RULES@
...
...
dlls/xmllite/reader.c
0 → 100644
View file @
80a546ca
/*
* IXmlReader implementation
*
* Copyright 2010 Nikolay Sivov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "objbase.h"
#include "xmllite.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
xmllite
);
HRESULT
WINAPI
CreateXmlReader
(
REFIID
riid
,
void
**
pObject
,
IMalloc
*
pMalloc
)
{
FIXME
(
"(%s, %p, %p)
\n
"
,
wine_dbgstr_guid
(
riid
),
pObject
,
pMalloc
);
return
E_NOTIMPL
;
}
dlls/xmllite/tests/Makefile.in
0 → 100644
View file @
80a546ca
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
xmllite.dll
IMPORTS
=
kernel32 ole32
CTESTS
=
\
reader.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/xmllite/tests/reader.c
0 → 100644
View file @
80a546ca
/*
* XMLLite IXmlReader tests
*
* Copyright 2010 (C) Nikolay Sivov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "xmllite.h"
#include "initguid.h"
#include "wine/test.h"
DEFINE_GUID
(
IID_IXmlReader
,
0x7279fc81
,
0x709d
,
0x4095
,
0xb6
,
0x3d
,
0x69
,
0xfe
,
0x4b
,
0x0d
,
0x90
,
0x30
);
HRESULT
WINAPI
(
*
pCreateXmlReader
)(
REFIID
riid
,
void
**
ppvObject
,
IMalloc
*
pMalloc
);
static
BOOL
init_pointers
(
void
)
{
/* don't free module here, it's to be unloaded on exit */
HMODULE
mod
=
LoadLibraryA
(
"xmllite.dll"
);
if
(
!
mod
)
{
win_skip
(
"xmllite library not available
\n
"
);
return
FALSE
;
}
pCreateXmlReader
=
(
void
*
)
GetProcAddress
(
mod
,
"CreateXmlReader"
);
if
(
!
pCreateXmlReader
)
return
FALSE
;
return
TRUE
;
}
static
void
test_reader_create
(
void
)
{
HRESULT
hr
;
IXmlReader
*
reader
;
IMalloc
*
imalloc
;
/* crashes native */
if
(
0
)
{
hr
=
pCreateXmlReader
(
&
IID_IXmlReader
,
NULL
,
NULL
);
hr
=
pCreateXmlReader
(
NULL
,
(
LPVOID
*
)
&
reader
,
NULL
);
}
hr
=
pCreateXmlReader
(
&
IID_IXmlReader
,
(
LPVOID
*
)
&
reader
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
skip
(
"Failed to create IXmlReader instance
\n
"
);
return
;
}
hr
=
CoGetMalloc
(
1
,
&
imalloc
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
hr
=
IMalloc_DidAlloc
(
imalloc
,
reader
);
ok
(
hr
!=
1
,
"Expected 0 or -1, got %08x
\n
"
,
hr
);
IXmlReader_Release
(
reader
);
}
START_TEST
(
reader
)
{
HRESULT
r
;
r
=
CoInitialize
(
NULL
);
ok
(
r
==
S_OK
,
"failed to init com
\n
"
);
if
(
!
init_pointers
())
{
CoUninitialize
();
return
;
}
test_reader_create
();
CoUninitialize
();
}
dlls/xmllite/xmllite.spec
View file @
80a546ca
@ st
ub CreateXmlReader
@ st
dcall CreateXmlReader(ptr ptr ptr)
@ stub CreateXmlReaderInputWithEncodingCodePage
@ stub CreateXmlReaderInputWithEncodingName
@ stub CreateXmlWriter
...
...
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