wasmjob: optional use of ducet codepage

This commit is contained in:
mattias 2022-08-21 21:02:10 +02:00
parent b5e81225ce
commit 33053cc810

View File

@ -5,7 +5,12 @@ library WasiDomTest1;
{$codepage UTF8}
{$WARN 5028 off : Local $1 "$2" is not used}
{off $DEFINE UseDucet}
uses
{$IFDEF UseDucet}
unicodeducet, unicodedata, fpwidestring,
{$ENDIF}
Math, SysUtils, Variants, JOB_Shared, JOB_Web, JOB_JS;
type
@ -158,9 +163,6 @@ var
begin
Bird:=TJSBird.JOBCreateGlobal('Bird') as IJSBird;
TestFuncResultVariantObject;
exit;
TestBooleanProperty;
TestIntegerProperty;
TestDoubleProperty;
@ -390,6 +392,11 @@ begin
Prefix:='TWasmApp.TestFuncResultVariant';
Bird.Name:='TestFuncResultVariant';
{$IFDEF UseDucet}
Value:=nil;
if Value<>nil then ;
{$ENDIF}
Value:=Bird.Echo(Variants.Null);
AssertEqual('Bird.Echo(Variant.Null) VarType',varNull,VarType(Value));
if Value<>Variants.Null then
@ -773,6 +780,9 @@ exports
var
Application: TWasmApp;
begin
{$IFDEF UseDucet}
SetActiveCollation('DUCET');
{$ENDIF}
Application:=TWasmApp.Create;
Application.Run;
end.