You are not logged in.
Pages: 1
Delphi 12.2
mORMot 2, Commit 2.3.11508
In the following test, I would have expected the result "True", but got "False". Where is the error?
var
va1, va2: TVariantDynArray;
begin
SetLength(va1, 2);
va1[0] := 'true';
va1[1] := 'false';
SetLength(va2, 2);
va2[0] := 'True';
va2[1] := 'False';
ShowMessage(DynArrayEquals(TypeInfo(TVariantDynArray), va1, va2, Nil, Nil, {CaseInsensitive=}True).ToString(TUseBoolStrs.True));
It works with TRawUtf8DynArray.
With best regards
Thomas
Offline
On my PC, the test passes with FPC:
https://github.com/synopse/mORMot2/commit/39ba5f1
I will try tomorrow with Delphi.
Perhaps it is an UnicodeString thing.
Edit:
I tried to reproduce it with UnicodeString, and no issue:
https://github.com/synopse/mORMot2/commit/b4f2c3c7b
But I don't have Delphi 12 here - just Delphi 2010 and Delphi XE7.
Offline
I can confirm that with mORMot 2, Commit 2.3.12684, it runs with the following Delphi versions: Delphi 10.2, Delphi 10.3, Delphi 10.4, Delphi 11.3, Delphi 12.3, Delphi 13.0.
I will test it with the latest mORMot version and Delphi 12.2 on Monday. It may be that we only need to update our mORMot version in the production version. I'm sorry I didn't test it beforehand.
With best regards
Thomas
Offline
I can confirm that it also works as desired with Delphi 12.2 and mORMot2 Commit 2.3.12685. The error has been fixed between Commit 2.3.11508 and 2.3.12685.
With best regards
Thomas
Offline
Pages: 1