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
edb68e7b
Commit
edb68e7b
authored
Oct 07, 2014
by
YongHao Hu
Committed by
Alexandre Julliard
Oct 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90/tests: Add cout<< double test.
parent
96e920e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
ios.c
dlls/msvcp90/tests/ios.c
+42
-0
No files found.
dlls/msvcp90/tests/ios.c
View file @
edb68e7b
...
...
@@ -1951,6 +1951,46 @@ static void test_ostream_print_ushort(void)
call_func1
(
p_basic_stringstream_wchar_vbase_dtor
,
&
wss
);
}
static
void
test_ostream_print_double
(
void
)
{
static
const
char
double_str
[]
=
"3.14159"
;
basic_stringstream_char
ss
;
basic_string_char
pstr
;
const
char
*
str
;
double
val
;
val
=
3
.
14159
;
call_func1
(
p_basic_stringstream_char_ctor
,
&
ss
);
call_func2_ptr_dbl
(
p_basic_ostream_char_print_double
,
&
ss
.
base
.
base2
,
val
);
call_func2
(
p_basic_stringstream_char_str_get
,
&
ss
,
&
pstr
);
str
=
call_func1
(
p_basic_string_char_cstr
,
&
pstr
);
ok
(
!
strcmp
(
double_str
,
str
),
"str = %s
\n
"
,
str
);
call_func1
(
p_basic_string_char_dtor
,
&
pstr
);
call_func1
(
p_basic_stringstream_char_vbase_dtor
,
&
ss
);
}
static
void
test_ostream_wchar_print_double
(
void
)
{
static
const
wchar_t
double_str
[]
=
{
'3'
,
'.'
,
'1'
,
'4'
,
'1'
,
'5'
,
'9'
,
0
};
basic_stringstream_wchar
wss
;
basic_string_wchar
pwstr
;
const
wchar_t
*
wstr
;
double
val
;
val
=
3
.
14159
;
call_func1
(
p_basic_stringstream_wchar_ctor
,
&
wss
);
call_func2_ptr_dbl
(
p_basic_ostream_wchar_print_double
,
&
wss
.
base
.
base2
,
val
);
call_func2
(
p_basic_stringstream_wchar_str_get
,
&
wss
,
&
pwstr
);
wstr
=
call_func1
(
p_basic_string_wchar_cstr
,
&
pwstr
);
ok
(
!
lstrcmpW
(
double_str
,
wstr
),
"wstr = %s
\n
"
,
wine_dbgstr_w
(
wstr
));
call_func1
(
p_basic_string_wchar_dtor
,
&
pwstr
);
call_func1
(
p_basic_stringstream_wchar_vbase_dtor
,
&
wss
);
}
START_TEST
(
ios
)
{
...
...
@@ -1968,6 +2008,8 @@ START_TEST(ios)
test_istream_tellg
();
test_istream_getline
();
test_ostream_print_ushort
();
test_ostream_print_double
();
test_ostream_wchar_print_double
();
ok
(
!
invalid_parameter
,
"invalid_parameter_handler was invoked too many times
\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