]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/InitialRepository.java
Added a unit test for bug 6989 and some methods to print expressions
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / InitialRepository.java
index 917696bf4aee757875d8d8044d0900f61d54e3a4..5608689f512079c8a01c76fa50e63476d767e888 100644 (file)
@@ -6,6 +6,8 @@ import org.simantics.scl.compiler.source.repository.SourceRepositories;
 import org.simantics.scl.osgi.SCLOsgi;
 
 public class InitialRepository {
+    public static final boolean NO_PRELUDE = false;
+    
     private static ModuleRepository MODULE_REPOSITORY1 = new ModuleRepository(
             new CompositeModuleSourceRepository(
                     SourceRepositories.BUILTIN_SOURCE_REPOSITORY,
@@ -13,7 +15,9 @@ public class InitialRepository {
                     ));
     
     public static ModuleRepository getInitialRepository() {
-        if(MODULE_REPOSITORY1.getModule("Prelude").didSucceed())
+        if(NO_PRELUDE)
+            return new ModuleRepository(SourceRepositories.BUILTIN_SOURCE_REPOSITORY);
+        else if(MODULE_REPOSITORY1.getModule("Prelude").didSucceed())
             return MODULE_REPOSITORY1;
         else
             return SCLOsgi.MODULE_REPOSITORY;