use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method bug2094.
@Test
public void bug2094() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug2094";
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.run();
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method documentPackage.
@Test
public void documentPackage() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.multi.a.sub";
try {
CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
tool.run();
} catch (RuntimeException x) {
Assert.assertEquals("Can't find module: org.eclipse.ceylon.ceylondoc.test.modules.multi.a.sub", x.getMessage());
return;
}
Assert.fail("Expected exception");
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method bug2285.
@Test
public void bug2285() throws Exception {
String pathname = "test/ceylondoc-doesnotexist";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug2285";
Module module = new Module();
module.setName(Arrays.asList(moduleName));
module.setVersion("1");
try {
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.run();
Assert.fail();
} catch (RuntimeException x) {
Assert.assertEquals("Can't find module: org.eclipse.ceylon.ceylondoc.test.modules.bug2285", x.getMessage());
}
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method ceylonSdk.
@Test
public void ceylonSdk() throws Exception {
Assume.assumeTrue(CompilerTests.allowSdkTests());
File sdkDir = new File("../../ceylon-sdk");
if (!sdkDir.exists() || !sdkDir.isDirectory()) {
Assert.fail("You don't have ceylon-sdk checked out at " + sdkDir.getAbsolutePath() + " so this test doesn't apply");
}
String[] fullModuleNames = { "ceylon.buffer", "ceylon.collection", "ceylon.dbc", "ceylon.decimal", "ceylon.file", "ceylon.html", "ceylon.http.client", "ceylon.http.common", "ceylon.http.server", "ceylon.interop.browser", "ceylon.interop.java", "ceylon.io", "ceylon.json", "ceylon.locale", "ceylon.logging", "ceylon.math", "ceylon.numeric", "ceylon.process", "ceylon.promise", "ceylon.random", "ceylon.regex", "ceylon.test", "ceylon.time", "ceylon.unicode", "ceylon.uri", "ceylon.whole", "org.eclipse.ceylon.war" };
compileSdkJavaFiles();
CeylonDocTool tool = tool(Arrays.asList(new File("../../ceylon-sdk/source")), new String[0], null, Collections.<File>emptyList(), Arrays.asList(fullModuleNames), true, false, false);
tool.setIncludeNonShared(false);
tool.setIncludeSourceCode(true);
tool.run();
Map<String, String> nameToVersion = new HashMap<String, String>();
for (Module module : tool.getDocumentedModules()) {
nameToVersion.put(module.getNameAsString(), module.getVersion());
}
for (String moduleName : fullModuleNames) {
File destDir = getOutputDir(tool, moduleName, nameToVersion.get(moduleName));
assertFileExists(destDir, "index.html");
}
}
use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.
the class CeylonDocToolTests method containsJavaCode.
@Test
public void containsJavaCode() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.mixed";
// compile the java code first
compileJavaModule(pathname, "org/eclipse/ceylon/ceylondoc/test/modules/mixed/Java.java", "org/eclipse/ceylon/ceylondoc/test/modules/mixed/JavaWithCeylonAnnotations.java");
CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
tool.run();
File destDir = getOutputDir(tool, moduleName, "1.0.0");
assertOverloadedMethods(destDir);
}
Aggregations