import com.redhat.ceylon.compiler.typechecker.TypeChecker;
import com.redhat.ceylon.compiler.typechecker.TypeCheckerBuilder;
import com.redhat.ceylon.compiler.typechecker.tree.Tree;

import java.io.File;

/**
 * Some hack before a proper unit test harness is put in place
 *
 * @author Emmanuel Bernard <emmanuel@hibernate.org>
 */
public class MainForTest {
    /**
     * Files that are not under a proper module structure are placed under a <nomodule> module.
     */
    public static void main(String[] args) throws Exception {

        final TypeChecker typeChecker = new TypeCheckerBuilder()
                .verbose(false)
                .addSrcDirectory( new File("test") )
                .getTypeChecker();
        final Tree.CompilationUnit compilationUnit = typeChecker.getCompilationUnitFromRelativePath("ceylon/language/BaseObject.ceylon");
        if ( compilationUnit == null ) {
            throw new RuntimeException("Failed to pass getCompilationUnitFromRelativePath");
        }
    }
}

@@ -720,22 +720,16 @@
         
-final 
 Tree.Com
@@ -974,16 +974,304 @@
 tivePath
+ for files in .src%22);%0A        %7D%0A        compilationUnit = typeChecker.getCompilationUnitFromRelativePath(%22capture/Capture.ceylon%22);%0A        if ( compilationUnit == null ) %7B%0A            throw new RuntimeException(%22Failed to pass getCompilationUnitFromRelativePath for files in real src dir
 %22);%0A    

Add more test on retrieving CompilationUnit from relative path