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

Unified Diff: tests/language/closures_initializer2_test.dart

Issue 19170002: Add regression test for bugfix in r24908 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/closures_initializer2_test.dart
diff --git a/tests/language/closures_initializer_test.dart b/tests/language/closures_initializer2_test.dart
similarity index 58%
copy from tests/language/closures_initializer_test.dart
copy to tests/language/closures_initializer2_test.dart
index 1a2f127398a5bcda50117b6691168e6fc1ec8c3c..7f9ef6b7b1c8d361c6b96110a7b1ca156060b080 100644
--- a/tests/language/closures_initializer_test.dart
+++ b/tests/language/closures_initializer2_test.dart
@@ -4,12 +4,7 @@
class A<T> {
var t;
- A() : t = (() => new List<T>());
-}
-
-class B<T> {
- var t;
- B() : t = (() => T);
+ A() : t = (() => T);
}
expect(result, expected) {
@@ -19,8 +14,8 @@ expect(result, expected) {
}
main() {
- expect(new A<int>().t() is List<int>, true);
- expect(new A<String>().t() is List<int>, false);
- expect(new B<int>().t() is Type, true);
- expect(new B<int>().t(), int);
+ for (var i=0; i<int.parse("1"); i++) {
ngeoffray 2013/07/15 10:11:54 spaces around '=' and '<'.
ngeoffray 2013/07/15 10:11:54 Does the loop matter?
kustermann 2013/07/15 10:26:25 Yes it does. Because then it will inline 'expect'
kustermann 2013/07/15 10:26:25 Done.
+ expect(new A<int>().t() is Type, true);
+ }
}
+
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698