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

Side by Side Diff: tests/kernel/unsorted/generic_function_test.dart

Issue 2878543006: Remove the argument from main in a test (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 // Tests of generic functions. 5 // Tests of generic functions.
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 typedef R Foo<R>(); 9 typedef R Foo<R>();
10 10
11 bar<R>(int body()) { 11 bar<R>(int body()) {
12 var function = () { 12 var function = () {
13 if (body is Foo<R>) { 13 if (body is Foo<R>) {
14 return body(); 14 return body();
15 } 15 }
16 return 42; 16 return 42;
17 }; 17 };
18 return function(); 18 return function();
19 } 19 }
20 20
21 main(args) { 21 main() {
22 Expect.isTrue(bar(() => 43) == 43); 22 Expect.isTrue(bar(() => 43) == 43);
23 } 23 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698