* Webassembly also has reversed clean - most likely 32/64 bits issue, not delphi/FPC issue

This commit is contained in:
Michaël Van Canneyt 2023-07-11 10:29:36 +02:00
parent e6c7efe057
commit e4ded6e277

View File

@ -449,12 +449,24 @@ begin
DoneExpectKeys;
end;
Const
{$IFDEF FPC}
{$IFNDEF CPUWASM}
ReverseDeleteNotification = True;
{$ElSE}
ReverseDeleteNotification = False;
{$ENDIF}
{$ELSE}
ReverseDeleteNotification = False;
{$ENDIF}
procedure TTestSimpleDictionary.TestNotificationDelete;
begin
DoAdd(3);
Dict.OnKeyNotify:=@DoKeyNotify;
SetExpectKeys('Clear',[1,2,3],[cnRemoved,cnRemoved,cnRemoved],{$IFDEF FPC}true{$ELSE}False{$endif});
SetExpectKeys('Clear',[1,2,3],[cnRemoved,cnRemoved,cnRemoved],ReverseDeleteNotification);
Dict.Clear;
DoneExpectKeys;
end;
@ -471,7 +483,7 @@ procedure TTestSimpleDictionary.TestValueNotificationDelete;
begin
DoAdd(3);
Dict.OnValueNotify:=@DoValueNotify;
SetExpectValues('Clear',['1','2','3'],[cnRemoved,cnRemoved,cnRemoved],{$IFDEF FPC}true{$ELSE}False{$endif});
SetExpectValues('Clear',['1','2','3'],[cnRemoved,cnRemoved,cnRemoved],ReverseDeleteNotification);
Dict.Clear;
DoneExpectValues;
end;