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

Side by Side Diff: tests/language_strong/callable_test.dart

Issue 2770063002: Revert "Format all multitests" (Closed)
Patch Set: Created 3 years, 9 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 6
7 class X { 7 class X {
8 call() => 42; 8 call() => 42;
9 } 9 }
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 static int staticMethod(int x) => x + 1; 26 static int staticMethod(int x) => x + 1;
27 } 27 }
28 28
29 typedef F(int x); 29 typedef F(int x);
30 typedef G(String y); 30 typedef G(String y);
31 typedef H(); 31 typedef H();
32 32
33 main() { 33 main() {
34 X x = new X(); 34 X x = new X();
35 Function f = x; // Should pass checked mode test 35 Function f = x; // Should pass checked mode test
36 Y y = new Y(); 36 Y y = new Y();
37 Function g = y; // Should pass checked mode test 37 Function g = y; // Should pass checked mode test
38 F f0 = y; // Should pass checked mode test 38 F f0 = y; // Should pass checked mode test
39 F f1 = x; //# 00: dynamic type error, static type warning 39 F f1 = x; //# 00: dynamic type error, static type warning
40 G g0 = y; //# 01: dynamic type error, static type warning 40 G g0 = y; //# 01: dynamic type error, static type warning
41 41
42 Expect.equals(f(), 42); 42 Expect.equals(f(), 42);
43 Expect.equals(g(100), 187); 43 Expect.equals(g(100), 187);
44 44
45 var z = new Z<int>(123); 45 var z = new Z<int>(123);
46 Expect.equals(z(), 123); 46 Expect.equals(z(), 123);
47 // TODO(jmesserly): this test doesn't work yet. 47 // TODO(jmesserly): this test doesn't work yet.
48 // Expect.equals((z as dynamic)(), 123); 48 // Expect.equals((z as dynamic)(), 123);
49 49
50 Expect.equals(Y.staticMethod(6), 7); 50 Expect.equals(Y.staticMethod(6), 7);
51 Expect.equals(Z.staticMethod(6), 7); 51 Expect.equals(Z.staticMethod(6), 7);
52 52
53 var xx = new XX.named(); 53 var xx = new XX.named();
54 Expect.equals(xx(), 42); 54 Expect.equals(xx(), 42);
55 55
56 H xx2 = new XX.named(); 56 H xx2 = new XX.named();
57 Expect.equals(xx2(), 42); 57 Expect.equals(xx2(), 42);
58 } 58 }
OLDNEW
« no previous file with comments | « tests/language_strong/call_type_literal_test.dart ('k') | tests/language_strong/cascade_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698