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

Unified Diff: tests/compiler/dart2js/unparser_test.dart

Issue 10583016: Add a test for operator[] unparse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Last iteration Created 8 years, 6 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 | « tests/compiler/dart2js/parser_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index fb770fb9b3e78a51df186022d6f055bd73054a5c..ac7e7a46394116ccefbbc85ee22c62c347ec10c7 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -10,6 +10,11 @@ testUnparse(String statement) {
Expect.equals(statement, node.unparse());
}
+testUnparseMember(String member) {
+ Node node = parseMember(member);
+ Expect.equals(member, node.unparse());
+}
+
testGenericTypes() {
testUnparse('var x=new List<List<int>>();');
testUnparse('var x=new List<List<List<int>>>();');
@@ -26,8 +31,13 @@ testEmptyList() {
testUnparse('var x= [];');
}
+testIndexedOperatorDecl() {
+ testUnparseMember('operator[](int i)=> null;');
+}
+
main() {
testGenericTypes();
testForLoop();
testEmptyList();
+ testIndexedOperatorDecl();
}
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698