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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/ParserRecoveryTest.java

Issue 10913197: Convert throw from a statement to an expression (issue 4872) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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: compiler/javatests/com/google/dart/compiler/parser/ParserRecoveryTest.java
===================================================================
--- compiler/javatests/com/google/dart/compiler/parser/ParserRecoveryTest.java (revision 12211)
+++ compiler/javatests/com/google/dart/compiler/parser/ParserRecoveryTest.java (working copy)
@@ -29,7 +29,7 @@
import com.google.dart.compiler.ast.DartSourceDirective;
import com.google.dart.compiler.ast.DartStatement;
import com.google.dart.compiler.ast.DartSwitchStatement;
-import com.google.dart.compiler.ast.DartThrowStatement;
+import com.google.dart.compiler.ast.DartThrowExpression;
import com.google.dart.compiler.ast.DartTryStatement;
import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.ast.DartUnit;
@@ -1607,7 +1607,7 @@
assertEquals("before", before.getName().getName());
DartPropertyAccess bad = (DartPropertyAccess) ((DartExprStmt) statements.get(1)).getExpression();
assertEquals("bad", ((DartIdentifier) bad.getQualifier()).getName());
- DartThrowStatement throwStatement = (DartThrowStatement) statements.get(2);
+ DartThrowExpression throwStatement = (DartThrowExpression) ((DartExprStmt) statements.get(2)).getExpression();
assertNotNull(throwStatement);
DartVariable after = ((DartVariableStatement) statements.get(3)).getVariables().get(0);
assertEquals("after", after.getName().getName());
@@ -1629,7 +1629,7 @@
assertEquals("before", before.getName().getName());
DartIdentifier bad = (DartIdentifier)((DartExprStmt) statements.get(1)).getExpression();
assertEquals("bad", bad.getName());
- DartThrowStatement throwStatement = (DartThrowStatement) statements.get(2);
+ DartThrowExpression throwStatement = (DartThrowExpression) ((DartExprStmt) statements.get(2)).getExpression();
assertNotNull(throwStatement);
DartVariable after = ((DartVariableStatement) statements.get(3)).getVariables().get(0);
assertEquals("after", after.getName().getName());

Powered by Google App Engine
This is Rietveld 408576698