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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java

Issue 15758006: Ensure that 'throw' has expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/parser/ErrorParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
index 944e34b141c7bb434ef6cbccfdb6a7d03ff9cfbd..551fd1629b0da992235c8890951d9bcd87d6b3da 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
@@ -89,17 +89,6 @@ public class ErrorParserTest extends ParserTestCase {
ParserErrorCode.MISSING_CLOSING_PARENTHESIS);
}
- public void fail_missingExpressionInThrow_withCascade() throws Exception {
- parse("parseThrowExpression", "throw;", ParserErrorCode.MISSING_EXPRESSION_IN_THROW);
- }
-
- public void fail_missingExpressionInThrow_withoutCascade() throws Exception {
- parse(
- "parseThrowExpressionWithoutCascade",
- "throw;",
- ParserErrorCode.MISSING_EXPRESSION_IN_THROW);
- }
-
public void fail_missingFunctionParameters_local_nonVoid_block() throws Exception {
// The parser does not recognize this as a function declaration, so it tries to parse it as an
// expression statement. It isn't clear what the best error message is in this case.
@@ -785,6 +774,17 @@ public class ErrorParserTest extends ParserTestCase {
ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE);
}
+ public void test_missingExpressionInThrow_withCascade() throws Exception {
+ parse("parseThrowExpression", "throw;", ParserErrorCode.MISSING_EXPRESSION_IN_THROW);
+ }
+
+ public void test_missingExpressionInThrow_withoutCascade() throws Exception {
+ parse(
+ "parseThrowExpressionWithoutCascade",
+ "throw;",
+ ParserErrorCode.MISSING_EXPRESSION_IN_THROW);
+ }
+
public void test_missingFunctionBody_emptyNotAllowed() throws Exception {
parse(
"parseFunctionBody",

Powered by Google App Engine
This is Rietveld 408576698