mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-09 17:59:24 +01:00
Change tstringlistexchange test code to give different error values and check that sort is done properly instead of requiring a given number of exchanges
git-svn-id: trunk@40547 -
This commit is contained in:
parent
bf7af550c8
commit
0fafe640c5
@ -64,11 +64,17 @@ begin
|
|||||||
msl.OnChange := @dummy.Change;
|
msl.OnChange := @dummy.Change;
|
||||||
msl.Sort;
|
msl.Sort;
|
||||||
// TMyStringList.ExchangeItems called 5 times
|
// TMyStringList.ExchangeItems called 5 times
|
||||||
if msl.ExchangeCount <> 5 then
|
// if msl.ExchangeCount <> 5 then
|
||||||
Halt(1);
|
// Seems to be done in 4 exchanges
|
||||||
|
// Check that names are ordered correctly instead
|
||||||
|
if (msl[0] <> 'Alpha') or
|
||||||
|
(msl[1] <> 'Beta') or
|
||||||
|
(msl[2] <> 'Delta') or
|
||||||
|
(msl[3] <> 'Gamma') then
|
||||||
|
Halt(2);
|
||||||
// OnChange called once in Sort
|
// OnChange called once in Sort
|
||||||
if dummy.ExchangeCount <> 1 then
|
if dummy.ExchangeCount <> 1 then
|
||||||
Halt(1);
|
Halt(3);
|
||||||
finally
|
finally
|
||||||
msl.Free;
|
msl.Free;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user