aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar fzaiser <fzaiser@google.com>2017-09-01 14:26:04 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-09-01 15:29:31 +0200
commited3275d18dce18c4f158a4e56edb7bd8e0c752eb (patch)
treea7d210d214f0592bbbc999473843fd70dc6c2974 /src/test/java/com/google/devtools/build
parent215fc0d7f1a7656ea9c586ccbd53bd09c7711793 (diff)
Fix wrong location of string literals in the lexer
RELNOTES: none PiperOrigin-RevId: 167263494
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/LexerTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/LexerTest.java b/src/test/java/com/google/devtools/build/lib/syntax/LexerTest.java
index 1c4abd240e..8d9318f071 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/LexerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/LexerTest.java
@@ -447,11 +447,12 @@ public class LexerTest {
@Test
public void testTokenPositions() throws Exception {
- assertThat(positions(tokens("foo(bar, {1: 'quux'})"))).isEqualTo(
- // foo ( bar , { 1 :
- "[0,3) [3,4) [4,7) [7,8) [9,10) [10,11) [11,12)"
- // 'quux' } ) NEWLINE EOF
- + " [13,19) [19,20) [20,21) [20,21) [21,21)");
+ assertThat(positions(tokens("foo(bar, {1: 'quux'}, \"\"\"b\"\"\", r\"\")")))
+ .isEqualTo(
+ // foo ( bar , { 1 :
+ "[0,3) [3,4) [4,7) [7,8) [9,10) [10,11) [11,12)"
+ // 'quux' } , """b""" , r"" ) NEWLINE EOF
+ + " [13,19) [19,20) [20,21) [22,29) [29,30) [31,34) [34,35) [34,35) [35,35)");
}
@Test