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
355057d5
Commit
355057d5
authored
Jul 18, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Add tests for StrStrIW.
parent
1784dbd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
string.c
dlls/shlwapi/tests/string.c
+57
-0
No files found.
dlls/shlwapi/tests/string.c
View file @
355057d5
...
...
@@ -1109,6 +1109,62 @@ static void test_StrStrIA(void)
}
}
static
void
test_StrStrIW
(
void
)
{
static
const
WCHAR
emptyW
[]
=
{
0
};
static
const
WCHAR
deadbeefW
[]
=
{
'D'
,
'e'
,
'A'
,
'd'
,
'B'
,
'e'
,
'E'
,
'f'
,
0
};
static
const
WCHAR
deadW
[]
=
{
'D'
,
'e'
,
'A'
,
'd'
,
0
};
static
const
WCHAR
dead_lowerW
[]
=
{
'd'
,
'e'
,
'a'
,
'd'
,
0
};
static
const
WCHAR
adbeW
[]
=
{
'A'
,
'd'
,
'B'
,
'e'
,
0
};
static
const
WCHAR
adbe_lowerW
[]
=
{
'a'
,
'd'
,
'b'
,
'e'
,
0
};
static
const
WCHAR
beefW
[]
=
{
'B'
,
'e'
,
'E'
,
'f'
,
0
};
static
const
WCHAR
beef_lowerW
[]
=
{
'b'
,
'e'
,
'e'
,
'f'
,
0
};
static
const
WCHAR
cafeW
[]
=
{
'c'
,
'a'
,
'f'
,
'e'
,
0
};
const
struct
{
const
WCHAR
*
search
;
const
WCHAR
*
expect
;
}
StrStrIW_cases
[]
=
{
{
emptyW
,
NULL
},
{
deadW
,
deadbeefW
},
{
dead_lowerW
,
deadbeefW
},
{
adbeW
,
deadbeefW
+
2
},
{
adbe_lowerW
,
deadbeefW
+
2
},
{
beefW
,
deadbeefW
+
4
},
{
beef_lowerW
,
deadbeefW
+
4
},
{
cafeW
,
NULL
},
};
LPWSTR
ret
;
int
i
;
/* Tests crash on Win9x/Win2k */
if
(
0
)
{
ret
=
StrStrIW
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected StrStrIW to return NULL, got %p
\n
"
,
ret
);
ret
=
StrStrIW
(
NULL
,
emptyW
);
ok
(
!
ret
,
"Expected StrStrIW to return NULL, got %p
\n
"
,
ret
);
ret
=
StrStrIW
(
emptyW
,
NULL
);
ok
(
!
ret
,
"Expected StrStrIW to return NULL, got %p
\n
"
,
ret
);
}
ret
=
StrStrIW
(
emptyW
,
emptyW
);
ok
(
!
ret
,
"Expected StrStrIW to return NULL, got %p
\n
"
,
ret
);
for
(
i
=
0
;
i
<
sizeof
(
StrStrIW_cases
)
/
sizeof
(
StrStrIW_cases
[
0
]);
i
++
)
{
ret
=
StrStrIW
(
deadbeefW
,
StrStrIW_cases
[
i
].
search
);
ok
(
ret
==
StrStrIW_cases
[
i
].
expect
,
"[%d] Expected StrStrIW to return %p, got %p
\n
"
,
i
,
StrStrIW_cases
[
i
].
expect
,
ret
);
}
}
START_TEST
(
string
)
{
HMODULE
hShlwapi
;
...
...
@@ -1181,6 +1237,7 @@ START_TEST(string)
test_StrStrA
();
test_StrStrW
();
test_StrStrIA
();
test_StrStrIW
();
CoUninitialize
();
}
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