package org.simantics.scl.compiler.tests;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
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;
}
};
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;