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

Unified Diff: tests/language/checked_setter2_test.dart

Issue 16953004: Add test for checked setters of generic types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/checked_setter2_test.dart
diff --git a/tests/language/checked_setter_test.dart b/tests/language/checked_setter2_test.dart
similarity index 72%
copy from tests/language/checked_setter_test.dart
copy to tests/language/checked_setter2_test.dart
index 608a472f9c8dc27855c6bfa9650b6cfcec970635..370c8d0213b47378b971972cd4be648e273ae6fc 100644
--- a/tests/language/checked_setter_test.dart
+++ b/tests/language/checked_setter2_test.dart
@@ -2,18 +2,18 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Test that implicit setters in checked mode do a type check.
+// Test that implicit setters in checked mode do a type check generic types.
import "package:expect/expect.dart";
class A {
- C c;
+ C<int> c;
}
class B extends A {
}
-class C {
+class C<T> {
}
var array = [new B()];
@@ -27,6 +27,6 @@ main() {
inCheckedMode = true;
}
if (inCheckedMode) {
- Expect.throws(() => array[0].c = new B(), (e) => e is TypeError);
+ Expect.throws(() => array[0].c = new C<bool>(), (e) => e is TypeError);
}
-}
+}
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698