Search in sources :

Example 6 with CeylonDocTool

use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.

the class CeylonDocToolTests method classLoading.

@Test
public void classLoading() throws Exception {
    String pathname = "test/ceylondoc";
    // compile the a and b modules
    compile(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.a");
    compile(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.b");
    // now run docs on c, which uses b, which uses a
    CeylonDocTool tool = tool(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.c", true, "build/ceylon-cars");
    tool.run();
}
Also used : CeylonDocTool(com.redhat.ceylon.ceylondoc.CeylonDocTool) Test(org.junit.Test)

Example 7 with CeylonDocTool

use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.

the class CeylonDocToolTests method documentDefaultModule.

@Test
public void documentDefaultModule() throws Exception {
    String pathname = "test/ceylondoc";
    String moduleName = "default";
    CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
    tool.setIncludeNonShared(true);
    tool.run();
    Module a = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.a", "1");
    File destDirA = getOutputDir(tool, a);
    Module b = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.b", "1");
    File destDirB = getOutputDir(tool, b);
    Module def = makeDefaultModule();
    File destDirDef = getOutputDir(tool, def);
    assertFileNotExists(destDirA, "index.html");
    assertFileNotExists(destDirB, "index.html");
    assertFileExists(destDirDef, "index.html");
    assertFileExists(destDirDef, "com/redhat/ceylon/ceylondoc/test/modules/multi/goes/into/bar.object.html");
    assertFileExists(destDirDef, "com/redhat/ceylon/ceylondoc/test/modules/multi/goes/into/defaultmodule/foo.object.html");
}
Also used : CeylonDocTool(com.redhat.ceylon.ceylondoc.CeylonDocTool) Module(com.redhat.ceylon.model.typechecker.model.Module) File(java.io.File) Test(org.junit.Test)

Example 8 with CeylonDocTool

use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.

the class CeylonDocToolTests method bug2094.

@Test
public void bug2094() throws Exception {
    String pathname = "test/ceylondoc";
    String moduleName = "com.redhat.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();
}
Also used : CeylonDocTool(com.redhat.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Example 9 with CeylonDocTool

use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.

the class CeylonDocToolTests method containsJavaCode.

@Test
public void containsJavaCode() throws Exception {
    String pathname = "test/ceylondoc";
    String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.mixed";
    // compile the java code first
    compileJavaModule(pathname, "com/redhat/ceylon/ceylondoc/test/modules/mixed/Java.java");
    CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
    tool.run();
}
Also used : CeylonDocTool(com.redhat.ceylon.ceylondoc.CeylonDocTool) Test(org.junit.Test)

Example 10 with CeylonDocTool

use of com.redhat.ceylon.ceylondoc.CeylonDocTool in project ceylon-compiler by ceylon.

the class DocToolTests method testDoc.

@Test
public void testDoc() throws Exception {
    ToolModel<CeylonDocTool> model = pluginLoader.loadToolModel("doc");
    Assert.assertNotNull(model);
    CeylonDocTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--src=test/src", "com.redhat.ceylon.tools.test.ceylon"));
    tool.run();
}
Also used : CeylonDocTool(com.redhat.ceylon.ceylondoc.CeylonDocTool) Test(org.junit.Test)

Aggregations

CeylonDocTool (com.redhat.ceylon.ceylondoc.CeylonDocTool)21 Test (org.junit.Test)18 File (java.io.File)13 Module (com.redhat.ceylon.model.typechecker.model.Module)9 CeylonTool (com.redhat.ceylon.common.tools.CeylonTool)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1