diff options
author | Laurent Le Brun <laurentlb@google.com> | 2015-08-10 15:13:34 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2015-08-11 07:51:30 +0000 |
commit | e083a9167dff6804a2ff788bcf843e29fa1d821d (patch) | |
tree | 80b3993fffd4a869d2d9e483df7c0807f4bace27 /src/test/java/com/google | |
parent | 310a1ebff45fb19d36edf0e09afda724de1158c8 (diff) |
Allow heterogeneous lists in Skylark.
This brings consistency between BUILD and Skylark interpreters. It also brings
consistency with dicts (e.g. **kwargs can contain anything and kwargs.values
is allowed).
--
MOS_MIGRATED_REVID=100278980
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java index 744e6db31b..575e0a67d7 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java @@ -867,15 +867,12 @@ public class SkylarkEvaluationTest extends EvaluationTest { @Test public void testCannotCreateMixedListInSkylark() throws Exception { - new SkylarkTest().update("mock", new Mock()).testIfExactError( - "Incompatible types in list: found a int but the previous elements were strings", - "[mock.string(), 1, 2]"); + new SkylarkTest().testExactOrder("['a', 'b', 1, 2]", "a", "b", 1, 2); } @Test public void testCannotConcatListInSkylarkWithDifferentGenericTypes() throws Exception { - new SkylarkTest().update("mock", new Mock()).testIfExactError( - "cannot concatenate list of string with list of int", "mock.string_list() + [1, 2]"); + new SkylarkTest().testExactOrder("[1, 2] + ['a', 'b']", 1, 2, "a", "b"); } @Test |