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

Unified Diff: tests/language/checked_setter3_test.dart

Issue 158733003: Fix language tests wrt. warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: tests/language/checked_setter3_test.dart
diff --git a/tests/language/checked_setter3_test.dart b/tests/language/checked_setter3_test.dart
index 7a3e697a82e7ced3c36da1b4ddaaeae71bd89ec6..2af3a0dd152aa70c69a460d38440e369f9697f06 100644
--- a/tests/language/checked_setter3_test.dart
+++ b/tests/language/checked_setter3_test.dart
@@ -19,23 +19,25 @@ class A<T> {
}
class B<T> {
- T field = 42;
+ T field = 42; /// 01: static type warning
}
class C<T> {
- T field = 42;
+ T field = 42; /// 02: static type warning
}
main() {
var a = new A<String>();
var c = new C<int>();
+ var i = 42;
+ var s = 'foo';
if (inCheckedMode) {
- Expect.throws(() => a.field = 42, (e) => e is TypeError);
- Expect.throws(() => new B<String>(), (e) => e is TypeError);
- Expect.throws(() => c.field = 'foo', (e) => e is TypeError);
+ Expect.throws(() => a.field = i, (e) => e is TypeError);
+ Expect.throws(() => new B<String>(), (e) => e is TypeError); /// 01: continued
+ Expect.throws(() => c.field = s, (e) => e is TypeError); /// 02: continued
} else {
- a.field = 42;
- new B<String>();
- c.field = 'foo';
+ a.field = i;
+ new B<String>(); /// 01: continued
+ c.field = s; /// 02: continued
}
}

Powered by Google App Engine
This is Rietveld 408576698