merge r14129 from cpstrnew by paul (defcmp.pas is not merged because trunk already has this fix):

prefer widestring->unicodestring and vice versa conversions than widestring->ansistring

git-svn-id: trunk@19090 -
This commit is contained in:
paul 2011-09-17 11:32:44 +00:00
parent afa559ab2e
commit 067b863b1b
2 changed files with 28 additions and 0 deletions

1
.gitattributes vendored
View File

@ -9941,6 +9941,7 @@ tests/test/tcpstr2.pp svneol=native#text/plain
tests/test/tcpstr2a.pp svneol=native#text/plain
tests/test/tcpstr3.pp svneol=native#text/plain
tests/test/tcpstr4.pp svneol=native#text/plain
tests/test/tcpstr5.pp svneol=native#text/plain
tests/test/tcstring1.pp svneol=native#text/pascal
tests/test/tcstring2.pp svneol=native#text/pascal
tests/test/tdel1.pp svneol=native#text/plain

27
tests/test/tcpstr5.pp Normal file
View File

@ -0,0 +1,27 @@
procedure pw(const S : RawByteString); overload;
begin
WriteLn('fail');
end;
procedure pw(const S : WideString); overload;
begin
WriteLn('ok');
end;
procedure pu(const S : RawByteString); overload;
begin
WriteLn('fail');
end;
procedure pu(const S : UnicodeString); overload;
begin
WriteLn('ok');
end;
var
u : UnicodeString;
w : WideString;
begin
pw(u);
pu(w);
end.