diff options
author | 2017-02-14 19:12:02 +0000 | |
---|---|---|
committer | 2017-02-15 10:03:56 +0000 | |
commit | d4d7fca411ab598918348da9a39241e3eeea58be (patch) | |
tree | 48de4895b625d8d111b49f4901d045917703b90c /src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java | |
parent | a2f9f68fa7b944a6d2d86079af74ecd664c57328 (diff) |
BuildFileAST.eval() doesn't execute the code when there's a static error.
This has no visible effect on Bazel (eval is used just for internal
expressions that don't fail), and is therefore not tested.
It will be tested when we add tests to the standalone Skylark interpreter.
--
PiperOrigin-RevId: 147495990
MOS_MIGRATED_REVID=147495990
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/syntax/EvaluationTest.java | 5 |
1 files changed, 3 insertions, 2 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 db5d95cfe1..4a71755ab2 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 @@ -477,8 +477,9 @@ public class EvaluationTest extends EvaluationTestCase { @Test public void testListComprehensionModifiesGlobalEnv() throws Exception { - new SkylarkTest().update("x", 42).testIfErrorContains("ERROR 1:1: Variable x is read only", - "[x + 1 for x in [1,2,3]]"); + new SkylarkTest() + .update("x", 42) + .testIfErrorContains("Variable x is read only", "[x + 1 for x in [1,2,3]]"); new BuildTest().update("x", 42).setUp("y =[x + 1 for x in [1,2,3]]") .testExactOrder("y", 2, 3, 4).testLookup("x", 3); // (x is global) } |