Package com.github.sommeri.sourcemap

Examples of com.github.sommeri.sourcemap.FilePosition


  }

  @Test
  public void differentFilenamesUnknownContent() throws Exception {
    SourceMapGenerator generator = SourceMapGeneratorFactory.getInstance(SourceMapFormat.V3);
    generator.addMapping("file 1", null, "ahoj", new FilePosition(1, 1), new FilePosition(1, 1), new FilePosition(1, 5));
    generator.addMapping("file 1", null, "nazdar", new FilePosition(2, 1), new FilePosition(2, 1), new FilePosition(2, 5));
    generator.addMapping("file 2", null, "hello", new FilePosition(3, 1), new FilePosition(3, 1), new FilePosition(3, 5));
   
    String map = generateMap(generator);
    assertEquals("{\n\"version\":3,\n\"file\":\"name\",\n\"lineCount\":4,\n\"mappings\":\"A;CACCA,I;CACAC,I;CCCAC;\",\n\"sources\":[\"file 1\",\"file 2\"],\n\"sourcesContent\":[null,null],\n\"names\":[\"ahoj\",\"nazdar\",\"hello\"]\n}\n", map);
    //System.out.println(map);
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.sourcemap.FilePosition

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.