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

Unified Diff: utils/tests/peg/peg_test.dart

Issue 25536017: Get pegparser test to pass again (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « utils/peg/pegparser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/peg/peg_test.dart
diff --git a/utils/tests/peg/peg_test.dart b/utils/tests/peg/peg_test.dart
index 692dc1518e7b6c2b9c08772d85908feab0fb1334..b48453b3fec686aef9b3cff037291a61f2e75527 100644
--- a/utils/tests/peg/peg_test.dart
+++ b/utils/tests/peg/peg_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library peg_tests;
+import 'dart:core' hide Symbol;
import '../../peg/pegparser.dart';
testParens() {
@@ -144,7 +145,7 @@ testC() {
['(', expression, ')', (e) => e]
]);
- var postfixes = OR([['(', MANY(assignment_e, ',', 0), ')', binary('apply')],
+ var postfixes = OR([['(', MANY(assignment_e, separator: ',', min: 0), ')', binary('apply')],
['++', unary('postinc')],
['--', unary('postdec')],
['.', id, binary('field')],
@@ -295,7 +296,7 @@ show(grammar, rule, input) {
if (exception is ParseError)
ast = exception;
else
- throw;
+ rethrow;
}
print('${printList(ast)}');
}
@@ -315,7 +316,13 @@ void check(grammar, rule, input, expected) {
if (expected is String)
formatted = printList(ast);
- Expect.equals(expected, formatted, "parse: $input");
+ //Expect.equals(expected, formatted, "parse: $input");
+ if (expected != formatted) {
+ throw new ArgumentError(
+ "parse: $input"
+ "\n expected: $expected"
+ "\n found: $formatted");
+ }
}
// Prints the list in [1,2,3] notation, including nested lists.
« no previous file with comments | « utils/peg/pegparser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698