| 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"; | |
| 6 | |
| 7 main() { | 5 main() { |
| 8 { | 6 { |
| 9 // Generates identical compile time constants. | 7 // Generates identical compile time constants. |
| 10 var s1 = "abcdefgh"; | 8 var s1 = "abcdefgh"; |
| 11 var s2 = "abcd" "efgh"; | 9 var s2 = "abcd" "efgh"; |
| 12 var s3 = "ab" "cd" "ef" "gh"; | 10 var s3 = "ab" "cd" "ef" "gh"; |
| 13 var s4 = "a" "b" "c" "d" "e" "f" "g" "h"; | 11 var s4 = "a" "b" "c" "d" "e" "f" "g" "h"; |
| 14 var s5 = "a" 'b' r"c" r'd' """e""" '''f''' r"""g""" r'''h'''; | 12 var s5 = "a" 'b' r"c" r'd' """e""" '''f''' r"""g""" r'''h'''; |
| 15 Expect.isTrue(identical(s1, s2)); | 13 Expect.isTrue(identical(s1, s2)); |
| 16 Expect.isTrue(identical(s1, s3)); | 14 Expect.isTrue(identical(s1, s3)); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 Expect.equals(r"-foo-42-true-", | 102 Expect.equals(r"-foo-42-true-", |
| 105 r"-" "$x" r"""-""" """$y""" r'-' '$z' r'''-''', "j"); | 103 r"-" "$x" r"""-""" """$y""" r'-' '$z' r'''-''', "j"); |
| 106 Expect.equals(r"-$x-42-true-", | 104 Expect.equals(r"-$x-42-true-", |
| 107 r"-" r"$x" r"""-""" """$y""" r'-' '$z' r'''-''', "k"); | 105 r"-" r"$x" r"""-""" """$y""" r'-' '$z' r'''-''', "k"); |
| 108 Expect.equals(r"-foo-$y-true-", | 106 Expect.equals(r"-foo-$y-true-", |
| 109 r"-" "$x" r"""-""" r"""$y""" r'-' '$z' r'''-''', "l"); | 107 r"-" "$x" r"""-""" r"""$y""" r'-' '$z' r'''-''', "l"); |
| 110 Expect.equals(r"-foo-42-$z-", | 108 Expect.equals(r"-foo-42-$z-", |
| 111 r"-" "$x" r"""-""" """$y""" r'-' r'$z' r'''-''', "m"); | 109 r"-" "$x" r"""-""" """$y""" r'-' r'$z' r'''-''', "m"); |
| 112 } | 110 } |
| 113 } | 111 } |
| OLD | NEW |