OLD | NEW |
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 main() { | 7 main() { |
8 testEmpty(); | 8 testEmpty(); |
9 testInterpolation(); | 9 testInterpolation(); |
10 testMultiline(); | 10 testMultiline(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 Expect.equals(r"ba", 'b' "$s"); | 53 Expect.equals(r"ba", 'b' "$s"); |
54 Expect.equals(r"ba", 'b' '$s'); | 54 Expect.equals(r"ba", 'b' '$s'); |
55 Expect.equals(r"b$s", 'b' r'$s'); | 55 Expect.equals(r"b$s", 'b' r'$s'); |
56 | 56 |
57 Expect.equals(r"b-a-", 'b' "-$s-"); | 57 Expect.equals(r"b-a-", 'b' "-$s-"); |
58 Expect.equals(r"b-a-", 'b' '-$s-'); | 58 Expect.equals(r"b-a-", 'b' '-$s-'); |
59 Expect.equals(r"b-$s-", 'b' r'-$s-'); | 59 Expect.equals(r"b-$s-", 'b' r'-$s-'); |
60 } | 60 } |
61 | 61 |
62 testMultiline() { | 62 testMultiline() { |
63 Expect.equals("abe", | 63 Expect.equals( |
64 "a" | 64 "abe", |
65 "b" | 65 "a" |
66 "e"); | 66 "b" |
67 Expect.equals("a b e", | 67 "e"); |
68 "a " | 68 Expect.equals( |
69 "b " | 69 "a b e", |
70 "e"); | 70 "a " |
71 Expect.equals("a b e", | 71 "b " |
72 "a" | 72 "e"); |
73 " b" | 73 Expect.equals( |
74 " e"); | 74 "a b e", |
| 75 "a" |
| 76 " b" |
| 77 " e"); |
75 | 78 |
76 Expect.equals("abe", """ | 79 Expect.equals( |
77 a""" "b" "e"); | 80 "abe", |
78 Expect.equals("a b e", """ | 81 """ |
79 a""" " b" " e"); | 82 a""" |
| 83 "b" |
| 84 "e"); |
| 85 Expect.equals( |
| 86 "a b e", |
| 87 """ |
| 88 a""" |
| 89 " b" |
| 90 " e"); |
80 | 91 |
81 Expect.equals("abe", """ | 92 Expect.equals( |
82 a""" """ | 93 "abe", |
83 b""" """ | 94 """ |
| 95 a""" |
| 96 """ |
| 97 b""" |
| 98 """ |
84 e"""); | 99 e"""); |
85 } | 100 } |
86 | |
OLD | NEW |