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
45696154
Commit
45696154
authored
Mar 28, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sxs/tests: Add tests for CreateAssemblyNameObject.
parent
5a6b9ec3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
240 additions
and
2 deletions
+240
-2
configure
configure
+2
-1
configure.ac
configure.ac
+2
-1
Makefile.in
dlls/sxs/Makefile.in
+1
-0
Makefile.in
dlls/sxs/tests/Makefile.in
+7
-0
name.c
dlls/sxs/tests/name.c
+228
-0
No files found.
configure
View file @
45696154
...
...
@@ -15323,7 +15323,8 @@ wine_fn_config_dll stress.dll16 enable_win16
wine_fn_config_lib strmbase
wine_fn_config_lib strmiids
wine_fn_config_dll svrapi enable_svrapi
wine_fn_config_dll sxs enable_sxs
wine_fn_config_dll sxs enable_sxs implib
wine_fn_config_test dlls/sxs/tests sxs_test
wine_fn_config_dll system.drv16 enable_win16
wine_fn_config_dll t2embed enable_t2embed
wine_fn_config_dll tapi32 enable_tapi32 implib
...
...
configure.ac
View file @
45696154
...
...
@@ -2830,7 +2830,8 @@ WINE_CONFIG_DLL(stress.dll16,enable_win16)
WINE_CONFIG_LIB(strmbase)
WINE_CONFIG_LIB(strmiids)
WINE_CONFIG_DLL(svrapi)
WINE_CONFIG_DLL(sxs)
WINE_CONFIG_DLL(sxs,,[implib])
WINE_CONFIG_TEST(dlls/sxs/tests)
WINE_CONFIG_DLL(system.drv16,enable_win16)
WINE_CONFIG_DLL(t2embed)
WINE_CONFIG_DLL(tapi32,,[implib])
...
...
dlls/sxs/Makefile.in
View file @
45696154
MODULE
=
sxs.dll
IMPORTS
=
oleaut32 ole32
IMPORTLIB
=
sxs
C_SRCS
=
\
cache.c
\
...
...
dlls/sxs/tests/Makefile.in
0 → 100644
View file @
45696154
TESTDLL
=
sxs.dll
IMPORTS
=
sxs
C_SRCS
=
\
name.c
@MAKE_TEST_RULES@
dlls/sxs/tests/name.c
0 → 100644
View file @
45696154
/*
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* 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
*/
#include <stdio.h>
#define COBJMACROS
#include <windows.h>
#include <winsxs.h>
#include <corerror.h>
#include "wine/test.h"
static
const
WCHAR
wine1W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
wine2W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
','
,
'v'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'='
,
'\"'
,
'0'
,
'1'
,
'.'
,
'2'
,
'.'
,
'3'
,
'.'
,
'4'
,
'\"'
,
','
,
't'
,
'y'
,
'p'
,
'e'
,
'='
,
'\"'
,
'w'
,
'i'
,
'n'
,
'3'
,
'2'
,
'\"'
,
','
,
'p'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
'o'
,
'r'
,
'A'
,
'r'
,
'c'
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,
'1'
,
'.'
,
'2'
,
'.'
,
'3'
,
'.'
,
'4'
,
'\"'
,
0
};
static
const
WCHAR
wine8W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
' '
,
','
,
'v'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'='
,
'\"'
,
'1'
,
'.'
,
'2'
,
'.'
,
'3'
,
'.'
,
'4'
,
'\"'
,
0
};
static
const
WCHAR
wine9W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
','
,
'v'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
wine10W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
','
,
't'
,
'y'
,
'p'
,
'e'
,
'='
,
'\"'
,
'\"'
,
0
};
static
const
WCHAR
wine11W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
','
,
't'
,
'y'
,
'p'
,
'e'
,
'='
,
'\"'
,
'w'
,
'i'
,
'n'
,
'3'
,
'2'
,
0
};
static
void
test_CreateAssemblyNameObject
(
void
)
{
static
const
WCHAR
emptyW
[]
=
{
0
};
IAssemblyName
*
name
;
HRESULT
hr
;
hr
=
CreateAssemblyNameObject
(
NULL
,
wine1W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
NULL
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine1W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"expected S_OK got %08x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"expected non-NULL name
\n
"
);
IAssemblyName_Release
(
name
);
hr
=
CreateAssemblyNameObject
(
NULL
,
wine1W
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine1W
,
CANOF_SET_DEFAULT_VALUES
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
hr
=
CreateAssemblyNameObject
(
NULL
,
wine1W
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine1W
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
hr
=
CreateAssemblyNameObject
(
NULL
,
wine1W
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
NULL
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
emptyW
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine1W
,
CANOF_SET_DEFAULT_VALUES
|
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
NULL
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine3W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"expected S_OK got %08x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"expected non-NULL name
\n
"
);
IAssemblyName_Release
(
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine4W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine5W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
),
"expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine6W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
),
"expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine7W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
NULL
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine8W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"expected S_OK got %08x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"expected non-NULL name
\n
"
);
IAssemblyName_Release
(
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine9W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
name
=
NULL
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine10W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
S_OK
,
"expected S_OK got %08x
\n
"
,
hr
);
ok
(
name
!=
NULL
,
"expected non-NULL name
\n
"
);
IAssemblyName_Release
(
name
);
name
=
(
IAssemblyName
*
)
0xdeadbeef
;
hr
=
CreateAssemblyNameObject
(
&
name
,
wine11W
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG got %08x
\n
"
,
hr
);
ok
(
!
name
,
"expected NULL got %p
\n
"
,
name
);
}
START_TEST
(
name
)
{
test_CreateAssemblyNameObject
();
}
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