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

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

Issue 10957060: First stab at parsing redirecting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Add test exceptions. Created 8 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 | « tests/co19/co19-dart2js.status ('k') | tests/language/language_dart2js.status » ('j') | 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 03ac58e0adb42deffefb849a0846063e6c857e36..ddf2b6b9f38aa27c85883308801f623a5dec7e45 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -208,6 +208,41 @@ testCombinators() {
testUnparseTopLevelWithMetadata('export "søhest" hide a,show hide a,show;');
}
+testRedirectingFactoryConstructors() {
+ testUnparseMember("factory Foo() = Bar;");
+ testUnparseMember("factory Foo() = Bar.baz;");
+ testUnparseMember("factory Foo() = Bar<T>;");
+ testUnparseMember("factory Foo() = Bar<T>.baz;");
+ testUnparseMember("factory Foo() = prefix.Bar;");
+ testUnparseMember("factory Foo() = prefix.Bar.baz;");
+ testUnparseMember("factory Foo() = prefix.Bar<T>;");
+ testUnparseMember("factory Foo() = prefix.Bar<T>.baz;");
+ testUnparseMember("const factory Foo() = Bar;");
+ testUnparseMember("const factory Foo() = Bar.baz;");
+ testUnparseMember("const factory Foo() = Bar<T>;");
+ testUnparseMember("const factory Foo() = Bar<T>.baz;");
+ testUnparseMember("const factory Foo() = prefix.Bar;");
+ testUnparseMember("const factory Foo() = prefix.Bar.baz;");
+ testUnparseMember("const factory Foo() = prefix.Bar<T>;");
+ testUnparseMember("const factory Foo() = prefix.Bar<T>.baz;");
+ testUnparseMember("external factory Foo() = Bar;");
+ testUnparseMember("external factory Foo() = Bar.baz;");
+ testUnparseMember("external factory Foo() = Bar<T>;");
+ testUnparseMember("external factory Foo() = Bar<T>.baz;");
+ testUnparseMember("external factory Foo() = prefix.Bar;");
+ testUnparseMember("external factory Foo() = prefix.Bar.baz;");
+ testUnparseMember("external factory Foo() = prefix.Bar<T>;");
+ testUnparseMember("external factory Foo() = prefix.Bar<T>.baz;");
+ testUnparseMember("external const factory Foo() = Bar;");
+ testUnparseMember("external const factory Foo() = Bar.baz;");
+ testUnparseMember("external const factory Foo() = Bar<T>;");
+ testUnparseMember("external const factory Foo() = Bar<T>.baz;");
+ testUnparseMember("external const factory Foo() = prefix.Bar;");
+ testUnparseMember("external const factory Foo() = prefix.Bar.baz;");
+ testUnparseMember("external const factory Foo() = prefix.Bar<T>;");
+ testUnparseMember("external const factory Foo() = prefix.Bar<T>.baz;");
+}
+
main() {
testSignedConstants();
testGenericTypes();
@@ -225,4 +260,5 @@ main() {
testPart();
testPartOf();
testCombinators();
+ testRedirectingFactoryConstructors();
}
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698