Browse Source

wasmjob: optional use of ducet codepage

mattias 3 years ago
parent
commit
33053cc810
1 changed files with 13 additions and 3 deletions
  1. 13 3
      demo/wasienv/dom/WasiDomTest1.lpr

+ 13 - 3
demo/wasienv/dom/WasiDomTest1.lpr

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