mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 11:50:04 +02:00
* test only a limited grid of surrogate pairs to avoid that tests run longer
than all other tests together when testing with -j git-svn-id: branches/tg74/avx512@42646 -
This commit is contained in:
parent
f883dd6dbb
commit
bce70a5105
@ -18,6 +18,10 @@ uses
|
|||||||
type UnicodeChar = WideChar;
|
type UnicodeChar = WideChar;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
const
|
||||||
|
{ test only a spare grid, else the test runs too long (testing all combinations means dist=1) }
|
||||||
|
dist = 8;
|
||||||
|
|
||||||
procedure DoError(ACode : Integer; ACodePoint1, ACodePoint2 : Integer); overload;
|
procedure DoError(ACode : Integer; ACodePoint1, ACodePoint2 : Integer); overload;
|
||||||
begin
|
begin
|
||||||
WriteLn(
|
WriteLn(
|
||||||
@ -40,12 +44,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Inc(e);
|
Inc(e);
|
||||||
for i := Low(Word) to High(Word) do begin
|
for i := Low(Word) to High(Word) div dist do begin
|
||||||
if (i < HIGH_SURROGATE_BEGIN) or (i > HIGH_SURROGATE_END) then begin
|
if (i*dist < HIGH_SURROGATE_BEGIN) or (i*dist > HIGH_SURROGATE_END) then begin
|
||||||
for j := Low(Word) to High(Word) do begin
|
for j := Low(Word) to High(Word) div dist do begin
|
||||||
if (j < LOW_SURROGATE_BEGIN) or (j > LOW_SURROGATE_END) then begin
|
if (j*dist < LOW_SURROGATE_BEGIN) or (j*dist > LOW_SURROGATE_END) then begin
|
||||||
if TCharacter.IsSurrogatePair(UnicodeChar(i),UnicodeChar(j)) then
|
if TCharacter.IsSurrogatePair(UnicodeChar(i*dist),UnicodeChar(j*dist)) then
|
||||||
DoError(e,i,j);
|
DoError(e,i*dist,j*dist);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -18,6 +18,10 @@ uses
|
|||||||
type UnicodeChar = WideChar;
|
type UnicodeChar = WideChar;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
const
|
||||||
|
{ test only a spare grid, else the test runs too long (testing all combinations means dist=1) }
|
||||||
|
dist = 8;
|
||||||
|
|
||||||
procedure DoError(ACode : Integer; ACodePoint1, ACodePoint2 : Integer); overload;
|
procedure DoError(ACode : Integer; ACodePoint1, ACodePoint2 : Integer); overload;
|
||||||
begin
|
begin
|
||||||
WriteLn(
|
WriteLn(
|
||||||
@ -44,14 +48,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Inc(e);
|
Inc(e);
|
||||||
for i := Low(Word) to High(Word) do begin
|
for i := Low(Word) to High(Word) div dist do begin
|
||||||
if (i < HIGH_SURROGATE_BEGIN) or (i > HIGH_SURROGATE_END) then begin
|
if (i*dist < HIGH_SURROGATE_BEGIN) or (i*dist > HIGH_SURROGATE_END) then begin
|
||||||
for j := Low(Word) to High(Word) do begin
|
for j := Low(Word) to High(Word) div dist do begin
|
||||||
if (j < LOW_SURROGATE_BEGIN) or (j > LOW_SURROGATE_END) then begin
|
if (j*dist < LOW_SURROGATE_BEGIN) or (j*dist > LOW_SURROGATE_END) then begin
|
||||||
s[5] := UnicodeChar(i);
|
s[5] := UnicodeChar(i*dist);
|
||||||
s[6] := UnicodeChar(j);
|
s[6] := UnicodeChar(j*dist);
|
||||||
if TCharacter.IsSurrogatePair(s,5) then
|
if TCharacter.IsSurrogatePair(s,5) then
|
||||||
DoError(e,i,j);
|
DoError(e,i*dist,j*dist);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user