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
2f10ca52
Commit
2f10ca52
authored
Mar 04, 2003
by
Stefan Leichter
Committed by
Alexandre Julliard
Mar 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for GetPrivateProfileInt.
parent
e6af4ec6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
0 deletions
+91
-0
.cvsignore
dlls/kernel/tests/.cvsignore
+1
-0
Makefile.in
dlls/kernel/tests/Makefile.in
+1
-0
profile.c
dlls/kernel/tests/profile.c
+89
-0
No files found.
dlls/kernel/tests/.cvsignore
View file @
2f10ca52
...
@@ -13,5 +13,6 @@ locale.ok
...
@@ -13,5 +13,6 @@ locale.ok
path.ok
path.ok
pipe.ok
pipe.ok
process.ok
process.ok
profile.ok
testlist.c
testlist.c
thread.ok
thread.ok
dlls/kernel/tests/Makefile.in
View file @
2f10ca52
...
@@ -19,6 +19,7 @@ CTESTS = \
...
@@ -19,6 +19,7 @@ CTESTS = \
path.c
\
path.c
\
pipe.c
\
pipe.c
\
process.c
\
process.c
\
profile.c
\
thread.c
thread.c
@MAKE_TEST_RULES@
@MAKE_TEST_RULES@
...
...
dlls/kernel/tests/profile.c
0 → 100644
View file @
2f10ca52
/*
* Unit tests for profile functions
*
* Copyright (c) 2003 Stefan Leichter
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/test.h"
#include "winbase.h"
#include "windows.h"
#define KEY "ProfileInt"
#define SECTION "Test"
#define TESTFILE ".\\testwine.ini"
struct
_profileInt
{
LPCSTR
section
;
LPCSTR
key
;
LPCSTR
value
;
LPCSTR
iniFile
;
INT
defaultVal
;
UINT
result
;
};
static
void
test_profile_int
(
void
)
{
struct
_profileInt
profileInt
[]
=
{
{
NULL
,
NULL
,
NULL
,
NULL
,
70
,
0
},
/* 0 */
{
NULL
,
NULL
,
NULL
,
TESTFILE
,
-
1
,
4294967295
},
{
NULL
,
NULL
,
NULL
,
TESTFILE
,
1
,
1
},
{
SECTION
,
NULL
,
NULL
,
TESTFILE
,
-
1
,
4294967295
},
{
SECTION
,
NULL
,
NULL
,
TESTFILE
,
1
,
1
},
{
NULL
,
KEY
,
NULL
,
TESTFILE
,
-
1
,
4294967295
},
/* 5 */
{
NULL
,
KEY
,
NULL
,
TESTFILE
,
1
,
1
},
{
SECTION
,
KEY
,
NULL
,
TESTFILE
,
-
1
,
4294967295
},
{
SECTION
,
KEY
,
NULL
,
TESTFILE
,
1
,
1
},
{
SECTION
,
KEY
,
"-1"
,
TESTFILE
,
-
1
,
4294967295
},
{
SECTION
,
KEY
,
"-1"
,
TESTFILE
,
1
,
4294967295
},
/* 10 */
{
SECTION
,
KEY
,
"1"
,
TESTFILE
,
-
1
,
1
},
{
SECTION
,
KEY
,
"1"
,
TESTFILE
,
1
,
1
},
{
SECTION
,
KEY
,
"+1"
,
TESTFILE
,
-
1
,
1
},
{
SECTION
,
KEY
,
"+1"
,
TESTFILE
,
1
,
1
},
{
SECTION
,
KEY
,
"4294967296"
,
TESTFILE
,
-
1
,
0
},
/* 15 */
{
SECTION
,
KEY
,
"4294967296"
,
TESTFILE
,
1
,
0
},
{
SECTION
,
KEY
,
"4294967297"
,
TESTFILE
,
-
1
,
1
},
{
SECTION
,
KEY
,
"4294967297"
,
TESTFILE
,
1
,
1
},
{
SECTION
,
KEY
,
"-4294967297"
,
TESTFILE
,
-
1
,
4294967295
},
{
SECTION
,
KEY
,
"-4294967297"
,
TESTFILE
,
1
,
4294967295
},
/* 20 */
{
SECTION
,
KEY
,
"42A94967297"
,
TESTFILE
,
-
1
,
42
},
{
SECTION
,
KEY
,
"42A94967297"
,
TESTFILE
,
1
,
42
},
{
SECTION
,
KEY
,
"B4294967297"
,
TESTFILE
,
-
1
,
0
},
{
SECTION
,
KEY
,
"B4294967297"
,
TESTFILE
,
1
,
0
},
};
int
i
,
num_test
=
(
sizeof
(
profileInt
)
/
sizeof
(
struct
_profileInt
));
UINT
res
;
DeleteFileA
(
TESTFILE
);
for
(
i
=
0
;
i
<
num_test
;
i
++
)
{
if
(
profileInt
[
i
].
value
)
WritePrivateProfileStringA
(
SECTION
,
KEY
,
profileInt
[
i
].
value
,
profileInt
[
i
].
iniFile
);
res
=
GetPrivateProfileIntA
(
profileInt
[
i
].
section
,
profileInt
[
i
].
key
,
profileInt
[
i
].
defaultVal
,
profileInt
[
i
].
iniFile
);
ok
(
res
==
profileInt
[
i
].
result
,
"test<%02d>: ret<%010u> exp<%010u>"
,
i
,
res
,
profileInt
[
i
].
result
);
}
DeleteFileA
(
TESTFILE
);
}
START_TEST
(
profile
)
{
test_profile_int
();
}
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