Skip to content

Commit

Permalink
The source map lines are not zero based. Lines are one based. #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Horcrux7 committed Apr 1, 2019
1 parent 3ba7b44 commit a955493
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class SourceMapWriterTest {
public void simple() throws IOException {
SourceMapWriter map = new SourceMapWriter();

map.addMapping( new SourceMapping( 0, 0, "Test1.java" ) );
map.addMapping( new SourceMapping( 5, 1, "Test1.java" ) );
map.addMapping( new SourceMapping( 0, 1, "Test1.java" ) );
map.addMapping( new SourceMapping( 5, 2, "Test1.java" ) );
map.addMapping( new SourceMapping( 0, 4, "Test2.java" ) );
map.addMapping( new SourceMapping( 5, 9, "Test2.java" ) );

Expand All @@ -23,7 +23,7 @@ public void simple() throws IOException {
"\"version\":3,\n" +
"\"sources\":[\"Test1.java\",\"Test2.java\"],\n" +
"\"names\":[],\n" +
"\"mappings\":\";AAAA,KACA,LCGA,KAKA;\"\n" +
"\"mappings\":\"AAAA,KACA,LCEA,KAKA;\"\n" +
"}";
assertEquals( expected, generate.toString() );
}
Expand Down

0 comments on commit a955493

Please sign in to comment.