Commit 4b7333e2 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp60: Added basic_string tests.

parent 1c33835a
......@@ -15538,6 +15538,7 @@ wine_fn_config_dll msvcm90 enable_msvcm90
wine_fn_config_dll msvcp100 enable_msvcp100
wine_fn_config_test dlls/msvcp100/tests msvcp100_test
wine_fn_config_dll msvcp60 enable_msvcp60
wine_fn_config_test dlls/msvcp60/tests msvcp60_test
wine_fn_config_dll msvcp70 enable_msvcp70
wine_fn_config_dll msvcp71 enable_msvcp71
wine_fn_config_dll msvcp80 enable_msvcp80
......
......@@ -2804,6 +2804,7 @@ WINE_CONFIG_DLL(msvcm90)
WINE_CONFIG_DLL(msvcp100)
WINE_CONFIG_TEST(dlls/msvcp100/tests)
WINE_CONFIG_DLL(msvcp60)
WINE_CONFIG_TEST(dlls/msvcp60/tests)
WINE_CONFIG_DLL(msvcp70)
WINE_CONFIG_DLL(msvcp71)
WINE_CONFIG_DLL(msvcp80)
......
......@@ -892,7 +892,7 @@ MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
if(pos > this->size-len+1)
pos = this->size-len+1;
end = this->ptr;
for(p=end+pos-1; p>=end; p--) {
for(p=end+pos; p>=end; p--) {
if(*p==*find && !char_traits_char_compare(p, find, len))
return p-this->ptr;
}
......@@ -1390,7 +1390,8 @@ basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_ch
memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
}
basic_string_char__Eos(this, this->size-len+str_len);
if(this->ptr)
basic_string_char__Eos(this, this->size-len+str_len);
return this;
}
......@@ -1784,7 +1785,7 @@ static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
return dest;
}
return memmove(dest, src, count);
return memmove(dest, src, count * sizeof(WCHAR));
}
static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
......@@ -1797,7 +1798,7 @@ static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
return dest;
}
return memcpy(dest, src, count);
return memcpy(dest, src, count * sizeof(wchar_t));
}
static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
......@@ -2602,7 +2603,7 @@ MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
if(pos > this->size-len+1)
pos = this->size-len+1;
end = this->ptr;
for(p=end+pos-1; p>=end; p--) {
for(p=end+pos; p>=end; p--) {
if(*p==*find && !char_traits_wchar_compare(p, find, len))
return p-this->ptr;
}
......@@ -3100,7 +3101,8 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_
memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
}
basic_string_wchar__Eos(this, this->size-len+str_len);
if(this->ptr)
basic_string_wchar__Eos(this, this->size-len+str_len);
return this;
}
......
TESTDLL = msvcp60.dll
APPMODE = -mno-cygwin
MODCFLAGS = @BUILTINFLAG@
EXTRAINCL = -I$(top_srcdir)/include/msvcrt
C_SRCS = \
string.c
@MAKE_TEST_RULES@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment