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

Unified Diff: tests/language_2/generic_tearoff_test.dart

Issue 3001803002: Migrate block 114 (and some of 113). (Closed)
Patch Set: Tweak app_jit status. 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
« no previous file with comments | « tests/language_2/generic_syntax_test.dart ('k') | tests/language_2/generic_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_2/generic_tearoff_test.dart
diff --git a/tests/language_strong/generic_tearoff_test.dart b/tests/language_2/generic_tearoff_test.dart
similarity index 69%
rename from tests/language_strong/generic_tearoff_test.dart
rename to tests/language_2/generic_tearoff_test.dart
index 620acb41d9f0e9aad84dd8ea0df0d79f7879952b..06c863fbca6067181c3831455fcfbf5f00242e29 100644
--- a/tests/language_strong/generic_tearoff_test.dart
+++ b/tests/language_2/generic_tearoff_test.dart
@@ -7,7 +7,7 @@ import 'dart:math' show min; // <-- generic: <T extends num>(T, T) -> T
import 'package:expect/expect.dart';
class C {
- /*=T*/ m/*<T extends num>*/(/*=T*/ x, /*=T*/ y) => min(x, y);
+ T m<T extends num>(T x, T y) => min(x, y);
int m2(int x, int y) => min(x, y);
}
@@ -17,10 +17,10 @@ void _test(Int2Int2Int f) {
int y = f(123, 456);
Expect.equals(y, 123);
// `f` doesn't take type args.
- Expect.throws(() => (f as dynamic) /*<int>*/(123, 456));
+ Expect.throws(() => (f as dynamic)<int>(123, 456));
}
-void _testParam(/*=T*/ minFn/*<T extends num>*/(/*=T*/ x, /*=T*/ y)) {
+void _testParam(T minFn<T extends num>(T x, T y)) {
_test(minFn);
}
@@ -32,13 +32,13 @@ main() {
_test(new C().m);
// Test local function, variable, and parameter
- /*=T*/ m/*<T extends num>*/(/*=T*/ x, /*=T*/ y) => min(x, y);
+ T m<T extends num>(T x, T y) => min(x, y);
_test(m);
final f = min;
_test(f);
_testParam(math.min);
// A few misc tests for methods
- Expect.equals(123, (new C() as dynamic).m/*<int>*/(123, 456));
- Expect.throws(() => (new C() as dynamic).m2/*<int>*/(123, 456));
+ Expect.equals(123, (new C() as dynamic).m<int>(123, 456));
+ Expect.throws(() => (new C() as dynamic).m2<int>(123, 456));
}
« no previous file with comments | « tests/language_2/generic_syntax_test.dart ('k') | tests/language_2/generic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698