aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java
diff options
context:
space:
mode:
authorGravatar Francois-Rene Rideau <tunes@google.com>2015-03-02 08:14:46 +0000
committerGravatar Ulf Adams <ulfjack@google.com>2015-03-05 14:16:04 +0000
commitf249d761abfa5e8892d12860a0f90e2c2d0aa32b (patch)
tree02e0285bc51e4ebd73059cd0dfddd160668a4652 /src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java
parent2e85a96ff7c0ffbaa1899dd25ff20fa311ddb6cf (diff)
Fix race condition in SkylarkType.of
Fix race condition in SkylarkType.of(), whereby .equals() but not same (==) types were created, by making Simple.of() synchronized. Also make SkylarkType#includes() more robust by using .equals() instead of == (it's a little bit slower in the case of Simple types once fixed, but also works on complex types that don't hash-cons their values). Also, distinguish SkylarkList (printed as list) and java.util.List (printed as List) and similarly for tuple vs Tuple, when printing types in debugging messages. -- MOS_MIGRATED_REVID=87490176
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java b/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java
index e32005065c..3d463f3018 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/BuildFileASTTest.java
@@ -97,7 +97,7 @@ public class BuildFileASTTest {
assertFalse(buildfile.exec(env, reporter));
Event e = JunitTestUtils.assertContainsEvent(collector,
- "unsupported operand type(s) for +: 'int' and 'list'");
+ "unsupported operand type(s) for +: 'int' and 'List'");
assertEquals(4, e.getLocation().getStartLineAndColumn().getLine());
}