OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'multiline_newline_cr.dart' as cr; | 6 import 'multiline_newline_cr.dart' as cr; |
7 import 'multiline_newline_crlf.dart' as crlf; | 7 import 'multiline_newline_crlf.dart' as crlf; |
8 import 'multiline_newline_lf.dart' as lf; | 8 import 'multiline_newline_lf.dart' as lf; |
9 | 9 |
10 main() { | 10 main() { |
(...skipping 14 matching lines...) Expand all Loading... |
25 const c1 = | 25 const c1 = |
26 cr.constantMultilineString == crlf.constantMultilineString ? true : null; | 26 cr.constantMultilineString == crlf.constantMultilineString ? true : null; |
27 const c2 = | 27 const c2 = |
28 crlf.constantMultilineString == lf.constantMultilineString ? true : null; | 28 crlf.constantMultilineString == lf.constantMultilineString ? true : null; |
29 const c3 = | 29 const c3 = |
30 lf.constantMultilineString == cr.constantMultilineString ? true : null; | 30 lf.constantMultilineString == cr.constantMultilineString ? true : null; |
31 Expect.isTrue(c1); | 31 Expect.isTrue(c1); |
32 Expect.isTrue(c2); | 32 Expect.isTrue(c2); |
33 Expect.isTrue(c3); | 33 Expect.isTrue(c3); |
34 | 34 |
35 const c4 = c1 ? 1 : 2; /// 01: ok | 35 const c4 = c1 ? 1 : 2; // /// 01: ok |
36 Expect.equals(1, c4); /// 01: continued | 36 Expect.equals(1, c4); // /// 01: continued |
37 | 37 |
38 const c5 = c2 ? 2 : 3; /// 02: ok | 38 const c5 = c2 ? 2 : 3; // /// 02: ok |
39 Expect.equals(2, c5); /// 02: continued | 39 Expect.equals(2, c5); // /// 02: continued |
40 | 40 |
41 const c6 = c3 ? 3 : 4; /// 03: ok | 41 const c6 = c3 ? 3 : 4; // /// 03: ok |
42 Expect.equals(3, c6); /// 03: continued | 42 Expect.equals(3, c6); // /// 03: continued |
43 | 43 |
44 const c7 = | 44 const c7 = |
45 cr.constantMultilineString != crlf.constantMultilineString ? true : null; | 45 cr.constantMultilineString != crlf.constantMultilineString ? true : null; |
46 const c8 = | 46 const c8 = |
47 crlf.constantMultilineString != lf.constantMultilineString ? true : null; | 47 crlf.constantMultilineString != lf.constantMultilineString ? true : null; |
48 const c9 = | 48 const c9 = |
49 lf.constantMultilineString != cr.constantMultilineString ? true : null; | 49 lf.constantMultilineString != cr.constantMultilineString ? true : null; |
50 Expect.isNull(c7); | 50 Expect.isNull(c7); |
51 Expect.isNull(c8); | 51 Expect.isNull(c8); |
52 Expect.isNull(c9); | 52 Expect.isNull(c9); |
53 | 53 |
54 const c10 = c7 ? 1 : 2; /// 04: compile-time error | 54 const c10 = c7 ? 1 : 2; // /// 04: compile-time error |
55 const c11 = c8 ? 2 : 3; /// 05: compile-time error | 55 const c11 = c8 ? 2 : 3; // /// 05: compile-time error |
56 const c12 = c9 ? 3 : 4; /// 06: compile-time error | 56 const c12 = c9 ? 3 : 4; // /// 06: compile-time error |
57 } | 57 } |
OLD | NEW |