Index: tests/compiler/dart2js/backend_dart/dart_printer_test.dart |
diff --git a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart |
index 801b75d1063d1f11d77c7ec2a556ec01cb067548..f6fd38bea1bf4c881d072e54887f4b89b43e688b 100644 |
--- a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart |
+++ b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart |
@@ -587,9 +587,14 @@ class AstBuilder extends Listener { |
push(new ForIn(declaredIdentifier, exp, body)); |
} |
- handleAssertStatement(Token assertKeyword, Token semicolonToken) { |
+ handleAssertStatement(Token assertKeyword, |
+ Token commaToken, Token semicolonToken) { |
+ Expression message; |
+ if (commaToken != null) message = pop(); |
Expression exp = pop(); |
- Expression call = new CallFunction(new Identifier("assert"), [exp]); |
+ var arguments = [exp]; |
+ if (message != null) arguments.add(message); |
+ Expression call = new CallFunction(new Identifier("assert"), arguments); |
push(new ExpressionStatement(call)); |
} |