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

Side by Side Diff: tests/language/generic_syntax_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 unified diff | Download patch
« no previous file with comments | « tests/language/generic_sends_test.dart ('k') | tests/language/generic_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 // Dart test verifying that the parser does not confuse parameterized types with
8 // boolean expressions, since both contain '<'.
9
10 class GenericSyntaxTest<B, C, D, E, F> {
11 GenericSyntaxTest() {}
12
13 void foo(x1, x2, x3, x4, x5) {
14 Expect.equals(true, x1);
15 Expect.equals(3, x2);
16 Expect.equals(4, x3);
17 Expect.equals(5, x4);
18 Expect.equals(false, x5);
19 }
20
21 void bar(x) {
22 Expect.equals(null, x(null));
23 }
24
25 test() {
26 var a = 1;
27 var b = 2;
28 var c = 3;
29 var d = 4;
30 var e = 5;
31 var f = 6;
32 var g = 7;
33 var h = null;
34 bar((A<B, C, D, E, F> g) {
35 return h;
36 }); // 'A<B' starts a generic type.
37 foo(a < b, c, d, e, f > g); // 'a<b' is a boolean function argument.
38 }
39
40 static testMain() {
41 new GenericSyntaxTest().test();
42 }
43 }
44
45 abstract class A<B, C, D, E, F> {}
46
47 main() {
48 GenericSyntaxTest.testMain();
49 }
OLDNEW
« no previous file with comments | « tests/language/generic_sends_test.dart ('k') | tests/language/generic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698