aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-09-11 13:51:41 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-11 14:22:39 +0000
commit6824d862a78e1613f256474383cc48d276f7555f (patch)
tree0744cfad8fdcd3ca7cc48c98bec3dfb325b6dd84 /src/test/java/com
parent90a159670963ff30eda0c05af565ebee3812de60 (diff)
Allow tuples inside square brackets (for list/dict indexing).
-- MOS_MIGRATED_REVID=102841541
Diffstat (limited to 'src/test/java/com')
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
index 83a55be2d8..8513d8339b 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java
@@ -436,6 +436,11 @@ public class EvaluationTest extends EvaluationTestCase {
}
@Test
+ public void testAccessDictWithATupleKey() throws Exception {
+ newTest().setUp("x = {(1, 2): 3}[1, 2]").testLookup("x", 3);
+ }
+
+ @Test
public void testRecursiveTupleDestructuring() throws Exception {
newTest()
.setUp("((a, b), (c, d)) = [(1, 2), (3, 4)]")