浏览代码

Modify the test to reflect the fact the compiler prefers conversion of ansiString to RawByteString over to UTF8String

git-svn-id: trunk@38781 -
pierre 7 年之前
父节点
当前提交
dbc0dd81fd
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      tests/test/tcpstr2a.pp

+ 6 - 1
tests/test/tcpstr2a.pp

@@ -1,13 +1,18 @@
-{ %fail }
 procedure p(const S : RawByteString); overload;
   begin
+    writeln(s,'AnsiString prefers RawByteString');
   end;
 
 procedure p(const S : UTF8String); overload;
   begin
+    writeln(s,'AnsiString prefers UTF8String');
+    { This is not expected, so generate error }
+    writeln('Unexpected, changed behavior!');
+    halt(1);
   end;
 var
   s1 : Ansistring;
 begin
+  s1:='Test: ';
   p(s1);
 end.