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

Side by Side Diff: tests/language/generic_methods_function_type_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions=--generic-method-syntax 5 // VMOptions=--generic-method-syntax
6 6
7 /// Dart test on the usage of method type arguments in a function typed 7 /// Dart test on the usage of method type arguments in a function typed
8 /// parameter declaration. 8 /// parameter declaration.
9 9
10 library generic_methods_function_type_test; 10 library generic_methods_function_type_test;
11 11
12 import "package:expect/expect.dart"; 12 import "package:expect/expect.dart";
13 13
14 class C<V> { 14 class C<V> {
15 U m1<U>(U f(V v), V v) => f(v); 15 U m1<U>(U f(V v), V v) => f(v);
16 V m2<U>(V f(U v), U u) => f(u); 16 V m2<U>(V f(U v), U u) => f(u);
17 } 17 }
18 18
19 main() { 19 main() {
20 Expect.equals(new C<int>().m1<int>((x) => x, 10), 10); 20 Expect.equals(new C<int>().m1<int>((x) => x, 10), 10);
21 Expect.equals(new C<int>().m2<int>((x) => x, 20), 20); 21 Expect.equals(new C<int>().m2<int>((x) => x, 20), 20);
22 } 22 }
23
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698