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

Unified Diff: tests/language_strong/function_subtype_bound_closure3_test.dart

Issue 2995813002: fix #30423, covariant parameter tearoff type should be Object (Closed)
Patch Set: Created 3 years, 4 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_strong/function_subtype_bound_closure3_test.dart
diff --git a/tests/language_strong/function_subtype_bound_closure3_test.dart b/tests/language_strong/function_subtype_bound_closure3_test.dart
index 1af7b9773851b606933a834a23534683b02cf2fe..6334342f65fe861d5875b52af8902e4988cb3d9f 100644
--- a/tests/language_strong/function_subtype_bound_closure3_test.dart
+++ b/tests/language_strong/function_subtype_bound_closure3_test.dart
@@ -16,21 +16,21 @@ class C<T> {
void foo(T a, [String b]) {}
void baz(T a, {String b}) {}
- void test(String nameOfT, bool expectedResult) {
- Expect.equals(expectedResult, foo is Foo, 'C<$nameOfT>.foo is Foo');
- Expect.equals(expectedResult, foo is Bar, 'C<$nameOfT>.foo is Bar');
+ void test(String nameOfT) {
+ Expect.isTrue(foo is Foo, 'C<$nameOfT>.foo is not Foo');
+ Expect.isTrue(foo is Bar, 'C<$nameOfT>.foo is not Bar');
Expect.isFalse(foo is Baz, 'C<$nameOfT>.foo is Baz');
Expect.isFalse(foo is Boz, 'C<$nameOfT>.foo is Boz');
Expect.isFalse(baz is Foo, 'C<$nameOfT>.baz is Foo');
Expect.isFalse(baz is Bar, 'C<$nameOfT>.baz is Bar');
- Expect.equals(expectedResult, baz is Baz, 'C<$nameOfT>.baz is Baz');
+ Expect.isTrue(baz is Baz, 'C<$nameOfT>.baz is not Baz');
Expect.isFalse(baz is Boz, 'C<$nameOfT>.baz is Boz');
}
}
main() {
- new C<bool>().test('bool', true);
- new C<int>().test('int', false);
- new C().test('dynamic', true);
+ new C<bool>().test('bool');
+ new C<int>().test('int');
+ new C().test('dynamic');
}

Powered by Google App Engine
This is Rietveld 408576698