Search in sources :

Example 11 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method externalLinks.

private File externalLinks(String repoUrl, String... linkArgs) throws Exception {
    compile("test/ceylondoc", "org.eclipse.ceylon.ceylondoc.test.modules.dependency.b");
    compile("test/ceylondoc", "org.eclipse.ceylon.ceylondoc.test.modules.dependency.c");
    List<String> modules = new ArrayList<String>();
    modules.add("org.eclipse.ceylon.ceylondoc.test.modules.dependency.b");
    modules.add("org.eclipse.ceylon.ceylondoc.test.modules.dependency.c");
    modules.add("org.eclipse.ceylon.ceylondoc.test.modules.externallinks");
    CeylonDocTool tool = tool(Arrays.asList(new File("test/ceylondoc")), Collections.<File>emptyList(), modules, true, true, false, "build/ceylon-cars");
    tool.setLinks(Arrays.asList(linkArgs));
    tool.run();
    File destDir = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.externallinks", "1.0");
    assertExternalLinks(destDir, repoUrl);
    return destDir;
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) ArrayList(java.util.ArrayList) File(java.io.File)

Example 12 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method bug1975.

@Test
public void bug1975() throws Exception {
    File dir = new File("build", "CeylonDocToolTest/" + name.getMethodName());
    String pathname = "test/ceylondoc";
    String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug1975";
    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();
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Example 13 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method dependentOnBinaryModule.

@Test
public void dependentOnBinaryModule() throws Exception {
    String pathname = "test/ceylondoc";
    // compile the b module
    compile(pathname, "org.eclipse.ceylon.ceylondoc.test.modules.dependency.b");
    CeylonDocTool tool = tool(pathname, "org.eclipse.ceylon.ceylondoc.test.modules.dependency.c", true, "build/ceylon-cars");
    tool.run();
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) Test(org.junit.Test)

Example 14 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method ceylonLanguage.

@Test
public void ceylonLanguage() throws Exception {
    String pathname = "../language/src";
    String moduleName = AbstractModelLoader.CEYLON_LANGUAGE;
    CeylonDocTool tool = tool(pathname, moduleName, true, true);
    tool.setIncludeNonShared(false);
    tool.setIncludeSourceCode(true);
    tool.run();
    File destDir = getOutputDir(tool, moduleName, LANGUAGE_MODULE_VERSION);
    assertFileExists(destDir, "index.html");
    assertFileExists(destDir, "Nothing.type.html");
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Example 15 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method bug2101.

@Test
public void bug2101() throws Exception {
    String pathname = "test/ceylondoc";
    String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug2101";
    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, moduleName, "1");
    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'>&quot;fake doc&quot;</span>\\)"));
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Aggregations

CeylonDocTool (org.eclipse.ceylon.ceylondoc.CeylonDocTool)23 Test (org.junit.Test)20 File (java.io.File)16 Module (org.eclipse.ceylon.model.typechecker.model.Module)3 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 CeylonTool (org.eclipse.ceylon.common.tools.CeylonTool)1