| OLD | NEW |
| 1 // Copyright (c) 2011, 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 class StringEscapesTest { | 5 class StringEscapesTest { |
| 6 | 6 |
| 7 static testMain() { | 7 static testMain() { |
| 8 testDelimited(); | 8 testDelimited(); |
| 9 testFixed2(); | 9 testFixed2(); |
| 10 testFixed4(); | 10 testFixed4(); |
| 11 testEscapes(); | 11 testEscapes(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 static testFixed4() { | 50 static testFixed4() { |
| 51 String str = "Foo\u0001Bar"; | 51 String str = "Foo\u0001Bar"; |
| 52 Expect.equals(7, str.length); | 52 Expect.equals(7, str.length); |
| 53 Expect.equals(1, str.charCodeAt(3)); | 53 Expect.equals(1, str.charCodeAt(3)); |
| 54 Expect.equals('B'.charCodeAt(0), str.charCodeAt(4)); | 54 Expect.equals('B'.charCodeAt(0), str.charCodeAt(4)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 static testLiteral() { | 57 static testLiteral() { |
| 58 String str = "\a\c\d\e\g\h\i\j\k\l\$\{\}\""; | 58 String str = "\a\c\d\e\g\h\i\j\k\l\$\{\}\""; |
| 59 Expect.equals(@'acdeghijkl${}"', str); | 59 Expect.equals(r'acdeghijkl${}"', str); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 main() { | 63 main() { |
| 64 StringEscapesTest.testMain(); | 64 StringEscapesTest.testMain(); |
| 65 } | 65 } |
| OLD | NEW |