msvcp90/tests: Remove unneeded casts.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-06-23 10:24:20 +02:00 committed by Alexandre Julliard
parent 2d4aac7408
commit c6530fee82
2 changed files with 18 additions and 18 deletions

View File

@ -1833,7 +1833,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */ if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &ss.base.base1, spos); call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &ss.base.base1, spos);
rpos = (fpos_int *)call_func2(p_basic_istream_char_tellg, &ss.base.base1, &tpos); rpos = call_func2(p_basic_istream_char_tellg, &ss.base.base1, &tpos);
ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off); ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off);
if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */ if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */
@ -1860,7 +1860,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */ if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wss.base.base1, spos); call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wss.base.base1, spos);
rpos = (fpos_int *)call_func2(p_basic_istream_wchar_tellg, &wss.base.base1, &tpos); rpos = call_func2(p_basic_istream_wchar_tellg, &wss.base.base1, &tpos);
ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off); ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off);
if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */ if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */
@ -1890,7 +1890,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */ if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &fs.base.base1, spos); call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &fs.base.base1, spos);
rpos = (fpos_int *)call_func2(p_basic_istream_char_tellg, &fs.base.base1, &tpos); rpos = call_func2(p_basic_istream_char_tellg, &fs.base.base1, &tpos);
ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n", ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos)); debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));
@ -1913,7 +1913,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */ if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wfs.base.base1, spos); call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wfs.base.base1, spos);
rpos = (fpos_int *)call_func2(p_basic_istream_wchar_tellg, &wfs.base.base1, &tpos); rpos = call_func2(p_basic_istream_wchar_tellg, &wfs.base.base1, &tpos);
ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n", ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos)); debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));

View File

@ -409,9 +409,9 @@ static void test_basic_string_char_swap(void) {
strcpy(atmp1, "qwerty"); strcpy(atmp1, "qwerty");
call_func2(p_basic_string_char_ctor_cstr, &str1, atmp1); call_func2(p_basic_string_char_ctor_cstr, &str1, atmp1);
call_func2(p_basic_string_char_swap, &str1, &str1); call_func2(p_basic_string_char_swap, &str1, &str1);
ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func2(p_basic_string_char_swap, &str1, &str1); call_func2(p_basic_string_char_swap, &str1, &str1);
ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func1(p_basic_string_char_dtor, &str1); call_func1(p_basic_string_char_dtor, &str1);
/* str1 allocated, str2 local */ /* str1 allocated, str2 local */
@ -420,11 +420,11 @@ static void test_basic_string_char_swap(void) {
call_func2(p_basic_string_char_ctor_cstr, &str1, atmp1); call_func2(p_basic_string_char_ctor_cstr, &str1, atmp1);
call_func2(p_basic_string_char_ctor_cstr, &str2, atmp2); call_func2(p_basic_string_char_ctor_cstr, &str2, atmp2);
call_func2(p_basic_string_char_swap, &str1, &str2); call_func2(p_basic_string_char_swap, &str1, &str2);
ok(strcmp(atmp2, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(strcmp(atmp2, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n"); ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func2(p_basic_string_char_swap, &str1, &str2); call_func2(p_basic_string_char_swap, &str1, &str2);
ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
ok(strcmp(atmp2, (const char *) call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n"); ok(strcmp(atmp2, call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func1(p_basic_string_char_dtor, &str1); call_func1(p_basic_string_char_dtor, &str1);
call_func1(p_basic_string_char_dtor, &str2); call_func1(p_basic_string_char_dtor, &str2);
} }
@ -607,8 +607,8 @@ static void test_basic_string_char_replace(void) {
ret = call_func4(p_basic_string_char_replace_cstr, &str, tests[i].off, tests[i].len, tests[i].replace); ret = call_func4(p_basic_string_char_replace_cstr, &str, tests[i].off, tests[i].len, tests[i].replace);
ok(ret == &str, "str = %p ret = %p\n", ret, &str); ok(ret == &str, "str = %p ret = %p\n", ret, &str);
ok(strcmp(tests[i].ret, (const char *) call_func1(p_basic_string_char_cstr, ret)) == 0, "str = %s ret = %s\n", ok(strcmp(tests[i].ret, call_func1(p_basic_string_char_cstr, ret)) == 0, "str = %s ret = %s\n",
tests[i].ret, (const char *) call_func1(p_basic_string_char_cstr, ret)); tests[i].ret, (const char*)call_func1(p_basic_string_char_cstr, ret));
call_func1(p_basic_string_char_dtor, &str); call_func1(p_basic_string_char_dtor, &str);
} }
@ -694,9 +694,9 @@ static void test_basic_string_wchar_swap(void) {
mbstowcs(wtmp1, "qwerty", 32); mbstowcs(wtmp1, "qwerty", 32);
call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1); call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1);
call_func2(p_basic_string_wchar_swap, &str1, &str1); call_func2(p_basic_string_wchar_swap, &str1, &str1);
ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func2(p_basic_string_wchar_swap, &str1, &str1); call_func2(p_basic_string_wchar_swap, &str1, &str1);
ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func1(p_basic_string_wchar_dtor, &str1); call_func1(p_basic_string_wchar_dtor, &str1);
/* str1 allocated, str2 local */ /* str1 allocated, str2 local */
@ -705,11 +705,11 @@ static void test_basic_string_wchar_swap(void) {
call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1); call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1);
call_func2(p_basic_string_wchar_ctor_cstr, &str2, wtmp2); call_func2(p_basic_string_wchar_ctor_cstr, &str2, wtmp2);
call_func2(p_basic_string_wchar_swap, &str1, &str2); call_func2(p_basic_string_wchar_swap, &str1, &str2);
ok(wcscmp(wtmp2, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(wcscmp(wtmp2, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n"); ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func2(p_basic_string_wchar_swap, &str1, &str2); call_func2(p_basic_string_wchar_swap, &str1, &str2);
ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n"); ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
ok(wcscmp(wtmp2, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n"); ok(wcscmp(wtmp2, call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func1(p_basic_string_wchar_dtor, &str1); call_func1(p_basic_string_wchar_dtor, &str1);
call_func1(p_basic_string_wchar_dtor, &str2); call_func1(p_basic_string_wchar_dtor, &str2);
} }