diff options
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java | 6 | ||||
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/javacc/FastCharStreamTestCase.java | 18 |
2 files changed, 13 insertions, 11 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java b/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java index 892240ce253..5468ba915fc 100644 --- a/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java +++ b/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java @@ -27,12 +27,12 @@ public class FastCharStream { return inputArr[readPos++]; } - @SuppressWarnings("deprecation") + @Deprecated public int getColumn() { return getEndColumn(); } - @SuppressWarnings("deprecation") + @Deprecated public int getLine() { return getEndLine(); } @@ -128,4 +128,4 @@ public class FastCharStream { return Integer.valueOf(str.substring(from, to)); } -}
\ No newline at end of file +} diff --git a/vespajlib/src/test/java/com/yahoo/javacc/FastCharStreamTestCase.java b/vespajlib/src/test/java/com/yahoo/javacc/FastCharStreamTestCase.java index a73fffc6c5c..ab444b29486 100644 --- a/vespajlib/src/test/java/com/yahoo/javacc/FastCharStreamTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/javacc/FastCharStreamTestCase.java @@ -30,25 +30,27 @@ public class FastCharStreamTestCase { @Test public void requireThatColumnIsTracked() throws IOException { FastCharStream input = new FastCharStream("foo"); - assertEquals(1, input.getColumn()); + assertEquals(1, input.getEndColumn()); input.readChar(); - assertEquals(2, input.getColumn()); + assertEquals(2, input.getEndColumn()); input.readChar(); - assertEquals(3, input.getColumn()); + assertEquals(3, input.getEndColumn()); input.readChar(); - assertEquals(4, input.getColumn()); + assertEquals(4, input.getEndColumn()); } @Test public void requireThatLineIsNotTracked() throws IOException { FastCharStream input = new FastCharStream("f\no"); - assertEquals(-1, input.getLine()); + assertEquals(-1, input.getEndLine()); + assertEquals(-1, input.getBeginLine()); input.readChar(); - assertEquals(-1, input.getLine()); + assertEquals(-1, input.getBeginLine()); input.readChar(); - assertEquals(-1, input.getLine()); + assertEquals(-1, input.getBeginLine()); input.readChar(); - assertEquals(-1, input.getLine()); + assertEquals(-1, input.getBeginLine()); + assertEquals(-1, input.getEndLine()); } |