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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java

Issue 10857041: Fix for issue 3550 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
===================================================================
--- compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java (revision 10845)
+++ compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java (working copy)
@@ -1357,6 +1357,15 @@
errEx(ResolverErrorCode.CONST_REQUIRES_VALUE, 4, 7, 1));
}
+ public void test_const_requiresConstValue() {
+ resolveAndTestCtConstExpectErrors(Joiner.on("\n").join(
+ "class Object {}",
+ "f() {",
+ " const id = 1.toString();",
+ "}"),
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 3, 14, 12));
+ }
+
public void testNoGetterOrSetter() {
resolveAndTest(Joiner.on("\n").join(
"class Object {}",
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698