diff --git a/META-INF/RASCAL.MF b/META-INF/RASCAL.MF index 88b97a17f04..32d2b010b13 100644 --- a/META-INF/RASCAL.MF +++ b/META-INF/RASCAL.MF @@ -1,5 +1,5 @@ Project-Name: rascal -Source: src/org/rascalmpl/library,test/org/rascalmpl/benchmark +Source: src/org/rascalmpl/library,test/org/rascalmpl/benchmark,/org/rascalmpl/test/data Courses: src/org/rascalmpl/courses diff --git a/src/org/rascalmpl/interpreter/load/StandardLibraryContributor.java b/src/org/rascalmpl/interpreter/load/StandardLibraryContributor.java index f9ce268d958..cdaf7225761 100644 --- a/src/org/rascalmpl/interpreter/load/StandardLibraryContributor.java +++ b/src/org/rascalmpl/interpreter/load/StandardLibraryContributor.java @@ -65,7 +65,6 @@ public void contributePaths(List l) { try { l.add(vf.sourceLocation("std","","")); - l.add(vf.sourceLocation("testdata","","")); l.add(vf.sourceLocation("test-modules","","")); } catch (URISyntaxException e) { @@ -75,7 +74,7 @@ public void contributePaths(List l) { @Override public String toString() { - return "[std://, testdata://, test-modules://]"; + return "[std:///, test-modules:///]"; } @Override diff --git a/src/org/rascalmpl/library/lang/rascal/tests/library/lang/java/m3/BasicM3Tests.rsc b/src/org/rascalmpl/library/lang/rascal/tests/library/lang/java/m3/BasicM3Tests.rsc index 67fa1e516f3..b76c684a5d1 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/library/lang/java/m3/BasicM3Tests.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/library/lang/java/m3/BasicM3Tests.rsc @@ -12,6 +12,8 @@ import String; import lang::java::m3::Core; import lang::java::m3::AST; +private loc get(str path) = {l} := findResources(path) ? l : |not-found:///| + path; + @javaClass{org.rascalmpl.library.lang.rascal.tests.library.lang.java.m3.SnakesAndLadders} public java loc getSnakesAndLaddersPath(); @@ -70,7 +72,7 @@ private M3 buildM3(loc projectName, loc root, list[loc] classPath, list[loc] sou = composeJavaM3(projectName, createM3sFromFiles(find(root, "java"),sourcePath = sourcePath, classPath = classPath, javaVersion ="1.7")); -// unpackExampleProject("snakes-and-ladders", |testdata:///m3/snakes-and-ladders-project-source.zip|); +// unpackExampleProject("snakes-and-ladders", get("m3/snakes-and-ladders-project-source.zip")); private bool compareM3s(loc reference, str projectName, loc sourceZip, M3 (loc) builder) = compareM3s( @@ -80,11 +82,11 @@ private bool compareM3s(loc reference, str projectName, loc sourceZip, M3 (loc) @ignoreCompiler{M3 not yet supported} public test bool junitM3RemainedTheSame() - = compareM3s(|testdata:///m3/junit4-m3s.bin|, "junit4", |testdata:///m3/junit4-project-source.zip|, getJunitM3); + = compareM3s(get("m3/junit4-m3s.bin"), "junit4", get("m3/junit4-project-source.zip"), getJunitM3); @ignoreCompiler{M3 not yet supported} public test bool snakesM3RemainedTheSame() - = compareM3s(|testdata:///m3/snakes-and-ladders-m3s.bin|, "snakes-and-ladders", |testdata:///m3/snakes-and-ladders-project-source.zip|, getSnakesM3); + = compareM3s(get("m3/snakes-and-ladders-m3s.bin"), "snakes-and-ladders", get("m3/snakes-and-ladders-project-source.zip"), getSnakesM3); private bool compareASTs(loc reference, str projectName, loc sourceZip, set[Declaration] (loc) builder) @@ -95,11 +97,11 @@ private bool compareASTs(loc reference, str projectName, loc sourceZip, set[Decl @ignoreCompiler{M3 not yet supported} public test bool junitASTsRemainedTheSame() - = compareASTs(|testdata:///m3/junit4-asts.bin|, "junit4", |testdata:///m3/junit4-project-source.zip|, getJunitASTs); + = compareASTs(get("m3/junit4-asts.bin"), "junit4", get("m3/junit4-project-source.zip"), getJunitASTs); @ignoreCompiler{M3 not yet supported} public test bool snakesASTsRemainedTheSame() - = compareASTs(|testdata:///m3/snakes-and-ladders-asts.bin|, "snakes-and-ladders", |testdata:///m3/snakes-and-ladders-project-source.zip|, getSnakesASTs); + = compareASTs(get("m3/snakes-and-ladders-asts.bin"), "snakes-and-ladders", get("m3/snakes-and-ladders-project-source.zip"), getSnakesASTs); private bool compareASTs(set[Declaration] a, set[Declaration] b) = a == b; @@ -121,7 +123,7 @@ private bool compareJarM3s(loc reference, loc jar, M3 (loc) builder) ); public test bool hamcrestJarM3RemainedTheSame() - = compareJarM3s(|testdata:///m3/hamcrest-library-1.3-m3.bin|, |testdata:///m3/hamcrest-library-1.3.jar|, getHamcrestM3); + = compareJarM3s(get("m3/hamcrest-library-1.3-m3.bin"), get("m3/hamcrest-library-1.3.jar"), getHamcrestM3); // TODO: think if this can be replaced by the generic diff function. public bool compareM3s(M3 a, M3 b) { diff --git a/src/org/rascalmpl/uri/libraries/TestDataURIResolver.java b/src/org/rascalmpl/uri/libraries/TestDataURIResolver.java deleted file mode 100644 index c7d10983007..00000000000 --- a/src/org/rascalmpl/uri/libraries/TestDataURIResolver.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.rascalmpl.uri.libraries; - -public class TestDataURIResolver extends ClassResourceInput { - - public TestDataURIResolver() { - super("testdata", TestDataURIResolver.class, "/org/rascalmpl/test/data"); - } - -} diff --git a/src/org/rascalmpl/uri/resolvers.config b/src/org/rascalmpl/uri/resolvers.config index c06967a2033..7fb9d101054 100644 --- a/src/org/rascalmpl/uri/resolvers.config +++ b/src/org/rascalmpl/uri/resolvers.config @@ -13,7 +13,6 @@ org.rascalmpl.uri.zip.ZipURIResolver org.rascalmpl.uri.file.HomeURIResolver org.rascalmpl.uri.file.CWDURIResolver org.rascalmpl.uri.file.SystemPathURIResolver -org.rascalmpl.uri.libraries.TestDataURIResolver org.rascalmpl.uri.libraries.MemoryResolver org.rascalmpl.uri.libraries.RascalLibraryURIResolver org.rascalmpl.shell.ManifestURIResolver