From ad27ccb3c52a10badddb423c84a3f7348d695811 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 26 Feb 2019 18:51:54 +0000 Subject: [PATCH] SynEdit: more tests git-svn-id: trunk@60518 - --- components/synedit/test/testmarkuphighall.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/synedit/test/testmarkuphighall.pas b/components/synedit/test/testmarkuphighall.pas index c5712201c9..235e94a7d7 100644 --- a/components/synedit/test/testmarkuphighall.pas +++ b/components/synedit/test/testmarkuphighall.pas @@ -149,12 +149,12 @@ begin Dict := TSynSearchDictionary.Create; - Dict.Add('foo' , 0); + Dict.Add('foo' , 0); // IDX 0 Dict.Add('Hello' , 1); Dict.Add('yello12345', 2); Dict.Add( 'lo123' , 3); Dict.Add( 'lo789' , 4); - Dict.Add('hell' , 5); + Dict.Add('hell' , 5); // IDX 5 Dict.Add('hatter' , 6); Dict.Add('log' , 7); Dict.Add('lantern' , 8); @@ -449,6 +449,9 @@ Dict.Add('uložit', 0); //Dict.BuildDictionary; //Dict.DebugPrint(true); + AssertEquals('GetMatchAtChar longer', 12,Dict.GetMatchAtChar('YESTERDAY ', 10, nil)); + AssertEquals('GetMatchAtChar exact len', 12,Dict.GetMatchAtChar('YESTERDAY ', 9, nil)); + AssertEquals('GetMatchAtChar too short', -1,Dict.GetMatchAtChar('YESTERDAY ', 8, nil)); Dict.Free; end;