Package juzu.impl.compiler

Examples of juzu.impl.compiler.CompilationError


  public void testNotAssignable() throws Exception {
    CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.notassignable");
    compiler.formalErrorReporting(true);
    List<CompilationError> errors = compiler.failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(BindingMetaModelPlugin.PROVIDER_NOT_ASSIGNABLE, error.getCode());
    File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "notassignable", "package-info.java");
    assertEquals(f, error.getSourceFile());
  }
View Full Code Here


  public void testAbstractClass() throws Exception {
    CompilerAssert<File, File> compiler = compiler("plugin.binding.provider.abstractclass");
    compiler.formalErrorReporting(true);
    List<CompilationError> errors = compiler.failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ABSTRACT, error.getCode());
    File f = compiler.getSourcePath().getPath("plugin", "binding", "provider", "abstractclass", "package-info.java");
    assertEquals(f, error.getSourceFile());
  }
View Full Code Here

  public void testNotAssignable() throws Exception {
    CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.notassignable");
    compiler.formalErrorReporting(true);
    List<CompilationError> errors = compiler.failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ASSIGNABLE, error.getCode());
    File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "notassignable", "package-info.java");
    assertEquals(f, error.getSourceFile());
  }
View Full Code Here

  public void testAbstractClass() throws Exception {
    CompilerAssert<File, File> compiler = compiler("plugin.binding.implementation.abstractclass");
    compiler.formalErrorReporting(true);
    List<CompilationError> errors = compiler.failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(BindingMetaModelPlugin.IMPLEMENTATION_NOT_ABSTRACT, error.getCode());
    File f = compiler.getSourcePath().getPath("plugin", "binding", "implementation", "abstractclass", "package-info.java");
    assertEquals(f, error.getSourceFile());
  }
View Full Code Here

  public void testCompile() throws Exception {
    CompilerAssert<?, ?> app  = compiler("plugin.asset.notfound.compile");
    app.formalErrorReporting();
    List<CompilationError> errors = app.failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(AssetMetaModelPlugin.ASSET_NOT_FOUND, error.getCode());
  }
View Full Code Here

  @Test
  public void testAbstract() throws Exception {
    List<CompilationError> app = compiler("plugin.controller.abstract_").formalErrorReporting().failCompile();
    assertEquals(1, app.size());
    CompilationError error = app.get(0);
    assertEquals(ControllerMetaModel.CONTROLLER_IS_ABSTRACT, error.getCode());
    assertTrue("Was expecting source to end with abstract_/A.java", error.getSource().endsWith("abstract_/A.java"));
  }
View Full Code Here

  @Test
  public void testIncludeCircular() throws Exception {
    List<CompilationError> errors = compiler("plugin.template.tag.includecircular").formalErrorReporting(true).failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertEquals(TemplateMetaModel.TEMPLATE_CYCLE, error.getCode());
    assertEquals(Arrays.asList(
        "Path[/plugin/template/tag/includecircular/templates/index.gtmpl]",
        "/plugin/template/tag/includecircular/templates/index.gtmpl->/plugin/template/tag/includecircular/templates/foo.gtmpl"),
        error.getArguments());
  }
View Full Code Here

  @Test
  public void testNotFound() throws Exception {
    List<CompilationError> errors = compiler("plugin.template.tag.notfound").formalErrorReporting(true).failCompile();
    assertEquals(1, errors.size());
    CompilationError error = errors.get(0);
    assertTrue(error.getSource().endsWith("template/tag/notfound/A.java"));
    assertEquals(TemplateMetaModel.UNKNOWN_TAG, error.getCode());
    assertEquals(Arrays.asList("notfound"), error.getArguments());
  }
View Full Code Here

TOP

Related Classes of juzu.impl.compiler.CompilationError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.