| 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 | 5 |
| 6 // Codegen dependency order test | 6 // Codegen dependency order test |
| 7 const UNINITIALIZED = const _Uninitialized(); | 7 const UNINITIALIZED = const _Uninitialized(); |
| 8 class _Uninitialized { const _Uninitialized(); } | 8 class _Uninitialized { const _Uninitialized(); } |
| 9 | 9 |
| 10 class Generic<T> { | 10 class Generic<T> { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 operator==(obj) { | 24 operator==(obj) { |
| 25 return obj is Derived && obj.z == z && super == obj; | 25 return obj is Derived && obj.z == z && super == obj; |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 // string escape tests | 29 // string escape tests |
| 30 // https://github.com/dart-lang/dev_compiler/issues/227 | 30 // https://github.com/dart-lang/dev_compiler/issues/227 |
| 31 bool _isWhitespace(String ch) => | 31 bool _isWhitespace(String ch) => |
| 32 ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'; | 32 ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'; |
| 33 | 33 |
| 34 const expr = 'foo'; |
| 34 const _escapeMap = const { | 35 const _escapeMap = const { |
| 35 '\n': r'\n', | 36 '\n': r'\n', |
| 36 '\r': r'\r', | 37 '\r': r'\r', |
| 37 '\f': r'\f', | 38 '\f': r'\f', |
| 38 '\b': r'\b', | 39 '\b': r'\b', |
| 39 '\t': r'\t', | 40 '\t': r'\t', |
| 40 '\v': r'\v', | 41 '\v': r'\v', |
| 41 '\x7F': r'\x7F', // delete | 42 '\x7F': r'\x7F', // delete |
| 43 '\${${expr}}': '' |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 | 46 |
| 45 main() { | 47 main() { |
| 46 // Number literals in call expressions. | 48 // Number literals in call expressions. |
| 47 print(1.toString()); | 49 print(1.toString()); |
| 48 print(1.0.toString()); | 50 print(1.0.toString()); |
| 49 print(1.1.toString()); | 51 print(1.1.toString()); |
| 50 | 52 |
| 51 // Type literals, #184 | 53 // Type literals, #184 |
| 52 dynamic x = 42; | 54 dynamic x = 42; |
| 53 print(x == dynamic); | 55 print(x == dynamic); |
| 54 print(x == Generic); | 56 print(x == Generic); |
| 55 | 57 |
| 56 // Should be Generic<dynamic> | 58 // Should be Generic<dynamic> |
| 57 print(new Generic<int>().type); | 59 print(new Generic<int>().type); |
| 58 | 60 |
| 59 print(new Derived() == new Derived()); // true | 61 print(new Derived() == new Derived()); // true |
| 60 } | 62 } |
| OLD | NEW |