Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java

Issue 397593003: Disallow reserved words for "const Symbol(...)" with the exception of 'void'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase on latest svn Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java
index 13bff77f719163bd2efdf046a828b76f02b0b45c..3959853d6b6e636513ab48a7c5bc21a1a7ccfee6 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java
@@ -738,6 +738,7 @@ public class ConstantValueComputerTest extends ResolverTestCase {
assertTrue(ConstantValueComputer.isValidPublicSymbol("foo="));
assertTrue(ConstantValueComputer.isValidPublicSymbol("foo.bar="));
assertTrue(ConstantValueComputer.isValidPublicSymbol("foo.+"));
+ assertTrue(ConstantValueComputer.isValidPublicSymbol("void"));
assertFalse(ConstantValueComputer.isValidPublicSymbol("_foo"));
assertFalse(ConstantValueComputer.isValidPublicSymbol("_foo.bar"));
assertFalse(ConstantValueComputer.isValidPublicSymbol("foo._bar"));
@@ -747,6 +748,8 @@ public class ConstantValueComputerTest extends ResolverTestCase {
assertFalse(ConstantValueComputer.isValidPublicSymbol("foo=.bar"));
assertFalse(ConstantValueComputer.isValidPublicSymbol("foo."));
assertFalse(ConstantValueComputer.isValidPublicSymbol("+.foo"));
+ assertFalse(ConstantValueComputer.isValidPublicSymbol("void.foo"));
+ assertFalse(ConstantValueComputer.isValidPublicSymbol("foo.void"));
}
private HashMap<String, DartObjectImpl> assertFieldType(HashMap<String, DartObjectImpl> fields,

Powered by Google App Engine
This is Rietveld 408576698