]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestBase.java
New SCL completion implementation
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / TestBase.java
index fa90f524cb4364386de2d71ff13c64209877702a..ed7b7250ddb12c70792d9f8e24d186527bfb060e 100644 (file)
@@ -1,5 +1,6 @@
 package org.simantics.scl.compiler.tests;
 
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
@@ -94,7 +95,7 @@ public class TestBase {
             moduleSources[i] = new StringModuleSource(
                     moduleNames[i], getClass().getClassLoader(), moduleTexts[i]) {
                 @Override
-                protected ImportDeclaration[] getBuiltinImports(UpdateListener listener) {
+                public ImportDeclaration[] getBuiltinImports(UpdateListener listener) {
                     return ImportDeclaration.ONLY_BUILTINS;
                 }
             };
@@ -122,6 +123,8 @@ public class TestBase {
 
     private String[] readTestParts(String testPath) throws IOException {
         InputStream stream = getClass().getResourceAsStream(testPath);
+        if(stream == null)
+            throw new FileNotFoundException(testPath);
         try {
             byte[] buffer = new byte[1024];
             int pos = 0;