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

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

Issue 11421216: More co19 clean up. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
index ae86c276659c05c5ae5b41d87422f1c66106ba9e..5c270db634d58d291a0b73b9ca83a0058c5d0dac 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
@@ -15,6 +15,16 @@ import static com.google.dart.compiler.common.ErrorExpectation.errEx;
*/
public class CompileTimeConstantTest extends ResolverTestCase {
+ public void test_conditionalExpression() {
+ resolveAndTestCtConstExpectErrors(
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class Object {}",
+ "const v = true ? 1 : 2;",
+ ""),
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 3, 11, 12));
+ }
+
public void test_nonConstArg() {
resolveAndTestCtConstExpectErrors(
Joiner.on("\n").join(
@@ -23,7 +33,7 @@ public class CompileTimeConstantTest extends ResolverTestCase {
"main() {",
" var a = const A(new A(null));",
"}"),
- errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 19, 11));
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 19, 11));
}
/**

Powered by Google App Engine
This is Rietveld 408576698