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

Unified Diff: tests/language/method_name_test.dart

Issue 1636583003: Allow methods to be named ‘factory’ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/method_name_test.dart
diff --git a/tests/language/method_name_test.dart b/tests/language/method_name_test.dart
index b0199cf63d17ca140f5e113786c6e7ea990559d8..ea9c7d2ccf63e3f978aaa82b5db7ff7e264aac28 100644
--- a/tests/language/method_name_test.dart
+++ b/tests/language/method_name_test.dart
@@ -12,6 +12,7 @@ class A {
int get() {return 1;}
int set() {return 2;}
int operator() {return 3;}
+ int factory() { return 4; }
}
// Without return types.
@@ -19,6 +20,7 @@ class B {
get() {return 1;}
set() {return 2;}
operator() {return 3;}
+ factory() { return 4; }
}
main() {
@@ -27,11 +29,13 @@ main() {
Expect.equals(1, a.get());
Expect.equals(2, a.set());
Expect.equals(3, a.operator());
+ Expect.equals(4, a.factory());
}
{
B b = new B();
Expect.equals(1, b.get());
Expect.equals(2, b.set());
Expect.equals(3, b.operator());
+ Expect.equals(4, b.factory());
}
}
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698