use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.
the class CeylonDocToolTests method ceylonLanguage.
@Test
public void ceylonLanguage() throws Exception {
String pathname = "../ceylon.language/src";
String moduleName = AbstractModelLoader.CEYLON_LANGUAGE;
CeylonDocTool tool = tool(pathname, moduleName, true, true);
tool.setIncludeNonShared(false);
tool.setIncludeSourceCode(true);
tool.run();
Module module = makeModule(AbstractModelLoader.CEYLON_LANGUAGE, LANGUAGE_MODULE_VERSION);
File destDir = getOutputDir(tool, module);
assertFileExists(destDir, "index.html");
assertFileExists(destDir, "Nothing.type.html");
}
use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.
the class CeylonDocToolTests method bug1622.
@Test
public void bug1622() throws Exception {
File dir = new File("build", "CeylonDocToolTest/" + name.getMethodName());
String pathname = "test/ceylondoc";
String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.bug1622";
compile(pathname, dir.getPath(), moduleName);
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.setIncludeNonShared(true);
tool.run();
}
use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.
the class CeylonDocToolTests method bug2346.
@Test
public void bug2346() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.bug2346";
Module module = new Module();
module.setName(Arrays.asList(moduleName));
module.setVersion("1");
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.run();
}
use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.
the class CeylonDocToolTests method bug2285.
@Test
public void bug2285() throws Exception {
String pathname = "test/ceylondoc-doesnotexist";
String moduleName = "com.redhat.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: com.redhat.ceylon.ceylondoc.test.modules.bug2285", x.getMessage());
}
}
use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.
the class CeylonDocToolTests method bug2101.
@Test
public void bug2101() throws Exception {
String pathname = "test/ceylondoc";
String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.bug2101";
Module module = new Module();
module.setName(Arrays.asList(moduleName));
module.setVersion("1");
CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
tool.run();
File destDir = getOutputDir(tool, module);
assertMatchInFile(destDir, "index.html", Pattern.compile("<span class='identifier'>bug2101</span>\\(\\)</code>" + "<div class='description'><div class='doc section'><p>actual doc</p>"));
assertMatchInFile(destDir, "a/index.html", Pattern.compile("<span class='identifier'>bug2101_wildcard_import</span>\\(\\)</code>" + "<div class='description'><div class='doc section'></div>" + "<div class='annotations section'><span class='title'>Annotations: </span><ul><li>doc\\(<span class='literal'>"fake doc"</span>\\)"));
}
Aggregations