1
0
mirror of synced 2024-12-22 17:23:07 +01:00
x2utils/Test/X2UtHashesTest.dpr

67 lines
1.3 KiB
ObjectPascal
Raw Normal View History

program X2UtHashesTest;
{$APPTYPE CONSOLE}
uses
2013-02-15 12:28:24 +01:00
madListHardware,
madListProcesses,
madListModules,
madExcept,
madLinkDisAsm,
SysUtils,
X2UtHashes,
2004-08-20 12:03:59 +02:00
X2UtBinaryTree,
FBTree in 'Forms\FBTree.pas' {frmBTree};
var
shData: TX2StringHash;
btTest: TX2StringBTree;
iItem: Integer;
pItem: PX2BTreeNode;
begin
// Test binary tree
btTest := TX2StringBTree.Create();
try
Randomize();
2004-08-20 12:03:59 +02:00
for iItem := 0 to 61 do
btTest[Random(500)] := 'bla';
btTest[40] := 'bla2';
btTest[50] := 'bla3';
if btTest.Exists(40, True) then
WriteLn(btTest.CurrentValue);
WriteLn;
btTest.Reset();
while btTest.Next() do
WriteLn(btTest.CurrentIndex, ' - ', btTest.CurrentValue);
TfrmBTree.Execute(btTest);
finally
FreeAndNil(btTest);
ReadLn;
end;
(*
shData := TX2UtStringHash.Create();
try
shData['thisakslhalskdjfhaslkdfjhaslkfjh'] := 'is';
shData['a'] := 'test';
2004-08-20 12:03:59 +02:00
TfrmBTree.Execute(shData);
{
shData.Reset();
while shData.Next() do
2004-07-29 15:48:35 +02:00
WriteLn(shData.CurrentKey, ': ', shData.CurrentValue, ' (',
shData[shData.CurrentKey], ')');
2004-08-20 12:03:59 +02:00
}
finally
FreeAndNil(shData);
2004-08-20 12:03:59 +02:00
//ReadLn;
end;
*)
end.