summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-07-06 15:57:03 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-07-06 15:57:03 +0000
commit44721a6c21579396751ca52980ea5834fadc0936 (patch)
tree5b0b4ca5ea9b300cd4d805823540d69903418377
parent56947a24b8f61715b9df0529f33fb568c0707bc1 (diff)
downloadfpc-44721a6c21579396751ca52980ea5834fadc0936.tar.gz
+ add static functions to check for the correct string helper
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39398 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--tests/test/uthlp.pp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test/uthlp.pp b/tests/test/uthlp.pp
index 688598989f..712628ec32 100644
--- a/tests/test/uthlp.pp
+++ b/tests/test/uthlp.pp
@@ -99,21 +99,25 @@ type
TShortStringHelper = record helper for ShortString
function Test: LongInt;
+ class function TestClass: LongInt; static;
constructor Create(aArg: ShortString);
end;
TAnsiStringHelper = record helper for AnsiString
function Test: LongInt;
+ class function TestClass: LongInt; static;
constructor Create(aArg: AnsiString);
end;
TWideStringHelper = record helper for WideString
function Test: LongInt;
+ class function TestClass: LongInt; static;
constructor Create(aArg: WideString);
end;
TUnicodeStringHelper = record helper for UnicodeString
function Test: LongInt;
+ class function TestClass: LongInt; static;
constructor Create(aArg: UnicodeString);
end;
@@ -334,6 +338,11 @@ begin
Result := 4;
end;
+class function TUnicodeStringHelper.TestClass: LongInt;
+begin
+ Result := 4;
+end;
+
constructor TUnicodeStringHelper.Create(aArg: UnicodeString);
begin
Self := aArg;
@@ -346,6 +355,11 @@ begin
Result := 3;
end;
+class function TWideStringHelper.TestClass: LongInt;
+begin
+ Result := 3;
+end;
+
constructor TWideStringHelper.Create(aArg: WideString);
begin
Self := aArg;
@@ -358,6 +372,11 @@ begin
Result := 2;
end;
+class function TAnsiStringHelper.TestClass: LongInt;
+begin
+ Result := 2;
+end;
+
constructor TAnsiStringHelper.Create(aArg: AnsiString);
begin
Self := aArg;
@@ -370,6 +389,11 @@ begin
Result := 1;
end;
+class function TShortStringHelper.TestClass: LongInt;
+begin
+ Result := 1;
+end;
+
constructor TShortStringHelper.Create(aArg: ShortString);
begin
Self := aArg;