Skip to content
Browse files

CeylonModuleRunner #1052: Fixed the default module version

  • Loading branch information...
1 parent 6cc7927 commit 5694e2996dfb2dc613f2f7dfacd511abcc3265e1 @FroMage FroMage committed May 28, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 test/src/com/redhat/ceylon/compiler/java/test/CeylonModuleRunner.java
View
6 test/src/com/redhat/ceylon/compiler/java/test/CeylonModuleRunner.java
@@ -255,14 +255,16 @@ public boolean accept(File dir, String name) {
} else if (files.length > 1) {
throw new RuntimeException("Unexpectedly more than one car file in " + moduleDir);
}
- final String version = files[0];
+ String version = files[0];
final File carFile;
if (version.equals("default.car")) {
carFile = new File(moduleDir, version);
+ version = "unversioned";
} else {
carFile = new File(moduleDir,
version + File.separator + moduleName + "-" + version+ ".car");
}
+ final String moduleVersion = version;
if (!carFile.exists()) {
throw new RuntimeException(carFile + " doesn't exist");
}
@@ -276,7 +278,7 @@ public void run() {
// set up the runtime module system
Metamodel.resetModuleManager();
Metamodel.loadModule("ceylon.language", TypeChecker.LANGUAGE_MODULE_VERSION, CompilerTest.makeArtifactResult(new File("../ceylon.language/ide-dist/ceylon.language-"+TypeChecker.LANGUAGE_MODULE_VERSION+".car")), cl);
- Metamodel.loadModule(moduleName, version, CompilerTest.makeArtifactResult(carFile), cl);
+ Metamodel.loadModule(moduleName, moduleVersion, CompilerTest.makeArtifactResult(carFile), cl);
}
};
return cl;

0 comments on commit 5694e29

Please sign in to comment.
Something went wrong with that request. Please try again.