Package juzu.plugin.less.impl.lesser

Examples of juzu.plugin.less.impl.lesser.LessError


  public void testFail() throws Exception {
    URLLessContext context = new URLLessContext(LesserTestCase.class.getClassLoader().getResource("lesser/test/"));
    Failure ret = (Failure)lesser.compile(context, "fail.less");
    LinkedList<LessError> errors = ret.getErrors();
    Assert.assertEquals(1, errors.size());
    LessError error = errors.get(0);
    Assert.assertEquals("fail.less", error.src);
    Assert.assertEquals(1, error.line);
    Assert.assertEquals(8, error.column);
    Assert.assertEquals(8, error.index);
    Assert.assertEquals("Parse", error.type);
View Full Code Here


  public void testCannotResolveImport() throws Exception {
    URLLessContext context = new URLLessContext(LesserTestCase.class.getClassLoader().getResource("lesser/test/"));
    Failure failure = (Failure)lesser.compile(context, "cannotresolveimport.less");
    LinkedList<LessError> errors = failure.getErrors();
    Assert.assertEquals(1, errors.size());
    LessError error = errors.get(0);
    Assert.assertEquals(1, error.line);
    Assert.assertEquals(4, error.column);
    Assert.assertEquals(4, error.index);
    Assert.assertEquals(Collections.emptyList(), Arrays.asList(error.extract));
    Assert.assertEquals("Parse", error.type);
View Full Code Here

  public void testUnresolableVariable() throws Exception {
    URLLessContext context = new URLLessContext(LesserTestCase.class.getClassLoader().getResource("lesser/test/"));
    Failure failure = (Failure)lesser.compile(context, "unresolvablevariable.less");
    LinkedList<LessError> errors = failure.getErrors();
    Assert.assertEquals(1, errors.size());
    LessError error = errors.get(0);
    Assert.assertEquals(1, error.line);
    Assert.assertEquals(17, error.column);
    Assert.assertEquals(17, error.index);
    Assert.assertEquals("Name", error.type);
  }
View Full Code Here

  @Test
  public void testExtract() throws Exception {
    URLLessContext context = new URLLessContext(LesserTestCase.class.getClassLoader().getResource("lesser/test/"));
    Failure failure = (Failure)lesser.compile(context, "extract.less");
    Assert.assertEquals(1, failure.getErrors().size());
    LessError error = failure.getErrors().get(0);
    Assert.assertEquals(2, error.line);
    String[] extract = error.extract;
    Assert.assertEquals(3, extract.length);
    Assert.assertEquals("// comment 1", extract[0]);
    Assert.assertEquals("a { width: + 1px }", extract[1]);
View Full Code Here

TOP

Related Classes of juzu.plugin.less.impl.lesser.LessError

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.