소스 검색

pastojs: fixed test TestExternalClass_SameNamePublishedProperty

mattias 4 년 전
부모
커밋
0bfef62666
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      compiler/packages/pastojs/tests/tcmodules.pas

+ 5 - 0
compiler/packages/pastojs/tests/tcmodules.pas

@@ -16975,6 +16975,7 @@ end;
 
 procedure TTestModule.TestExternalClass_SameNamePublishedProperty;
 begin
+  WithTypeInfo:=true;
   StartProgram(false);
   Add([
   '{$modeswitch externalclass}',
@@ -16990,10 +16991,14 @@ begin
   '  end;',
   'begin',
   '  JSwiper.new;',
+  //'  if typeinfo(JSwiper)=nil then ;',
   '']);
   ConvertProgram;
   CheckSource('TestExternalClass_SameNamePublishedProperty',
     LinesToStr([ // statements
+    'this.$rtti.$ExtClass("JSwiper", {',
+    '  jsclass: "Swiper"',
+    '});',
     'rtl.createClass(this, "TObject", null, function () {',
     '  this.$init = function () {',
     '    this.FSwiper = null;',