Browse Source

pastojs: enabled pcu tests

git-svn-id: trunk@40489 -
Mattias Gaertner 6 years ago
parent
commit
fe628565fb

+ 3 - 1
packages/pastojs/src/pas2jscompiler.pp

@@ -4563,7 +4563,7 @@ begin
   FoundPCUUnitName:='';
   if (InFilename='') and (Pos('.',UseUnitname)<1) then
   begin
-    // generic unit -> search with namespaces
+    // generic unit name -> search with namespaces
     // first the default program namespace
     DefNameSpace:=GetDefaultNamespace;
     if DefNameSpace<>'' then
@@ -4609,6 +4609,8 @@ begin
     end;
   end;
 
+  // Note: at the moment if there is a source do not search for pcu
+  // Eventually search for both, load pcu and if that fails unload pcu and load source
   if (FoundPasFilename='') and Assigned(PCUSupport) and (FoundPCUFilename='')  then
   begin
     // no pas file -> search pcu

+ 0 - 2
packages/pastojs/tests/tcprecompile.pas

@@ -558,8 +558,6 @@ begin
 end;
 
 Initialization
-  {$IFDEF EnablePas2jsPrecompiled}
   RegisterTests([TTestCLI_Precompile]);
-  {$ENDIF}
 end.
 

+ 2 - 2
packages/pastojs/tests/tcunitsearch.pas

@@ -29,14 +29,14 @@ uses
   fpcunit, testregistry,
   PScanner, PasTree,
   {$IFDEF CheckPasTreeRefCount}PasResolveEval,{$ENDIF}
-  Pas2jsFileUtils, Pas2jsCompiler, Pas2JSPCUCompiler, Pas2jsFileCache, Pas2jsLogger,
+  Pas2jsFileUtils, Pas2jsCompiler, Pas2JSFSCompiler, Pas2jsFileCache, Pas2jsLogger,
   tcmodules;
 
 type
 
   { TTestCompiler }
 
-  TTestCompiler = class(TPas2jsPCUCompiler)
+  TTestCompiler = class(TPas2jsFSCompiler)
   private
     FExitCode: longint;
   protected